Skip to content

Stop generating .packages #2756

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
lrhn opened this issue Nov 16, 2020 · 8 comments
Closed

Stop generating .packages #2756

lrhn opened this issue Nov 16, 2020 · 8 comments
Assignees

Comments

@lrhn
Copy link
Member

lrhn commented Nov 16, 2020

There is no need for a new SDK to generate a .packages file for itself. The only reason for having one is to support old third-party tools which have not started using the .dart_tool/package_config.json file yet.

We should identify any such tools blocking us from removing the .packages file, make sure they are updated, and then stop generating .packages files.

The sooner this is done, the better.

Would it be possible to stop generating the .packages file for Pub in SDK -dev builds? That should smoke out any remaining uses of the file. Maybe keep the feature available under a flag, so people really needing it can still get it that way?

@jonasfj
Copy link
Member

jonasfj commented Nov 17, 2020

ironically, pub might be one of the tools that depends on this file :D

Or put, differently: pub still expects the .packages file to be present when testing if dependencies are up-to-date (with pubspec.lock and pubspec.yaml).

I think we could:

  1. Ensure that pub doesn't require the presence of .packages optional,
  2. Add a --legacy-packages-file flag: Add flag controlling creation of .packages file. #2757
  3. Send out a breaking change notification that .packages is going away.
  4. Update docs: Migrate from .packages to package_config.json site-www#2777

@lrhn
Copy link
Member Author

lrhn commented Nov 17, 2020

Another thing that we can do, before flipping the flag, is that every time a pub run of a globally activated package finds only a .packages file, it immediately generates a .dart_tool/package_config.json file too (maybe just blindly copying the data from the .packages file and adding language version 2.7 to every package).

@mit-mit
Copy link
Member

mit-mit commented Oct 25, 2021

@jonasfj is the first item in your checklist done now?

@mit-mit
Copy link
Member

mit-mit commented Oct 25, 2021

Also, can I suggest we add the --no-packages-file flag, and configure all our own tests to run with that, to see if we can shake out any unknown issues?

@sigurdm
Copy link
Contributor

sigurdm commented Oct 29, 2021

@jonasfj is the first item in your checklist done now?

Yes, this was done in: #2764

@mit-mit
Copy link
Member

mit-mit commented Jan 25, 2022

Hi @jonasfj we need to make progress on this; can we go ahead and add the --no-packages-file flag?

@sigurdm
Copy link
Contributor

sigurdm commented Jan 25, 2022

Hi @jonasfj we need to make progress on this; can we go ahead and add the --no-packages-file flag?

I'll start reviving the PR we have lying around.

@sigurdm
Copy link
Contributor

sigurdm commented Jan 31, 2022

Done in #2757

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants