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.
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.
why was this field removed?
There was a problem hiding this comment.
because this is now the default argument
|
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.
Maybe this hard-coded path separator is leading to coverage collection failing on Windows?
There was a problem hiding this comment.
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.
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.
I'll debug this one today, I use a windows machine
There was a problem hiding this comment.
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: https://github.com/dart-lang/coverage/blob/master/lib/src/resolver.dart#L87 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.