Skip to content

flutter generated package is causing problems for pub #73870

@jonahwilliams

Description

@jonahwilliams

TLDR: the generate: true behavior prevents pub's up to date check from working when combined with path dependencies. The pub issue is: dart-lang/pub#2806

Short term solutions:

  • Tell users to disable generate: true
  • Have pub special case this package

Long-term solutions

Besides removing generate, we could replace the special generate keyword with a path dependency. This would have the same properties as the current generated package, but would work with pub.

pubspec.yaml

flutter:
  generate: true
  
 dependencies:
   ...

Becomes

flutter:
 dependencies:
   flutter_gen:
     path: .dart_tool/flutter_gen
   ...

The tool can use the presence of that path dependency to opt in.

cc @jonasfj @zanderso @shihaohong

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listr: duplicateIssue is closed as a duplicate of an existing issueteam-toolOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.triaged-toolTriaged by Flutter Tool team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions