-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Migrate .packages -> package_config.json #99677
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
Migrate .packages -> package_config.json #99677
Conversation
|
Not sure about the failing windows test - is it a regular timeout or is something else going on... |
jonahwilliams
left a comment
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.
I think the test itself might be flaky right now, though @christopherfujino might know more.
Otherwise LGTM, if LG to @christopherfujino
| BuildMode.debug, | ||
| '', | ||
| treeShakeIcons: false, | ||
| packagesPath: '.dart_tool/package_config.json', |
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.
why was this field removed?
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.
because this is now the default argument
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.
ahh, cool
|
Re-ran the tool integration test. |
| required this.treeShakeIcons, | ||
| this.performanceMeasurementFile, | ||
| this.packagesPath = '.packages', // TODO(zanderso): make this required and remove the default. | ||
| this.packagesPath = '.dart_tool/package_config.json', // TODO(zanderso): make this required and remove the default. |
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.
Maybe this hard-coded path separator is leading to coverage collection failing on Windows?
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.
odd that it is failing only for windows. Really, you should be able to use / conditionally ...
Perhaps the coverage code is doing some string matching instead of using package:path ?
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.
Using the platform separator will make the constructor non-const (which might not be a problem).
Cursory inspection doesn't show anything in package:coverage that should depend on backslash on windows...
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.
I'll debug this one today, I use a windows machine
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.
Gentle ping
This is blocking https://dart-review.googlesource.com/c/sdk/+/231101 .
|
So from investigation, it looks like the coverage resolver in package:coverage wants the packages path to be both a file path and a URI, which only works on Linux/macOS: I'm going to work out how to fix this |
|
Fix is dart-archive/coverage#371 , which needs to be rolled into flutter first |
That PR was merged, we are now blocked on a new published pub version. @bkonyi or @natebosch do you know the process for publishing |
Either @natebosch or @liamappelbe (maybe) should be able to publish a new version. |
Pretty please :) |
Done |
Until recently, BuildInfo.packagesPath defaulted to `.packages` however, the .packages file has been deprecated [1] and is being removed. In flutter#99677 the default was changed to `.dart_tool/package_config.json` but the doc comment was accidentally updated to `.dart_tool/packages`. This corrects it to the true default value. 1: dart-lang/sdk#48272 Spotted in the midst of some related cleanup relating to flutter#103775
Until recently, BuildInfo.packagesPath defaulted to `.packages` however, the .packages file has been deprecated [1] and is being removed. In #99677 the default was changed to `.dart_tool/package_config.json` but the doc comment was accidentally updated to `.dart_tool/packages`. This corrects it to the true default value. 1: dart-lang/sdk#48272 Spotted in the midst of some related cleanup relating to #103775
Replace .packages with .dart_tool/package_config.json in BuildInfo.packagesPath.
Fixes: #99678
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.