-
Notifications
You must be signed in to change notification settings - Fork 232
Add flag controlling creation of .packages
file.
#2757
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
Conversation
Created in anticipation of switching the default to *not* generate the file.
Hmm, I think we have to update some of the code that asserts state is up-to-date. You're suggesting, we: add a flag that allows disabling generation of I can see the argument for starting to remove |
Hmm, I think we have to update some of the code that asserts state is up-to-date. I have landed: #2764 that removes the assert that .packages is up to date in case it doesn't exist, it also removes several other places where we wrongly relied on .packages. |
Hmm - I don't remember where we ended up last we discussed this. But IMO we should just continue creating this file until dart 3. |
I merged this with upstream and turned the flag to be off by default. |
ping @jonasfj |
@sigurdm can you clarify the flag behavoir? Is the flag |
yes
yes |
OK. We would have to send the breaking change notice for this first then. This is a slightly faster approach than the one discussed in #2756 (which suggested first having a flag you must opt-in to using to skip the generation of .packages), but given how old this file is, I'm OK with moving ahead here. @lrhn WDYT? |
My thinking was that now we had the deprecation notice in the file we should be able to take this step. But I'm also ok with having the .packages generation still be on by default. |
We introduced |
lib/src/command/add.dart
Outdated
@@ -93,7 +93,7 @@ class AddCommand extends PubCommand { | |||
argParser.addOption('directory', | |||
abbr: 'C', help: 'Run this in the directory <dir>.', valueHelp: 'dir'); | |||
argParser.addFlag('packages-file', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to cal this flag legacy-package-file
just to be extraordinarily clear?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
…art-lang#2757)" (dart-lang#3357)" This reverts commit d1c0e3f.
WDYT?
Related to #2756