-
Notifications
You must be signed in to change notification settings - Fork 29.3k
[flutter_tools] remove most use of global packages path #60231
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
[flutter_tools] remove most use of global packages path #60231
Conversation
I'm gonna live dangerously and let frob tell me if this is breaking :) |
const String kPackagesFileName = '.packages'; | ||
|
||
String get globalPackagesPath => _globalPackagesPath ?? kPackagesFileName; | ||
String get globalPackagesPathDepreactedNoUse => _globalPackagesPath ?? kPackagesFileName; |
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.
Can we @Deprecated('Prefer BuildInfo.packagesPath')
instead of hinting in the name?
Edit: I tried this and there were no analyzer warnings where it was used. Does that annotation not work?
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.
Did we disable it for the framework? FYI @goderbauer ?
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.
In practice, I tend not to use deprecated because it would flag the framework warning lint
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.
That's annoying.
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.
LGTM, assuming merge conflicts are fixed.
const String kPackagesFileName = '.packages'; | ||
|
||
String get globalPackagesPath => _globalPackagesPath ?? kPackagesFileName; | ||
String get globalPackagesPathDepreactedNoUse => _globalPackagesPath ?? kPackagesFileName; |
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.
That's annoying.
Started Google testing for this PR |
1 similar comment
Started Google testing for this PR |
Google testing failed... |
Fixed, name is referenced in google3 |
Started Google testing for this PR |
1 similar comment
Started Google testing for this PR |
Google testing failed... |
FYI @renyou , it looks like the second run didn't actually trigger another presubmit, instead it surfaced warnings from the first roll |
I've seen that when I've run frob manually, fixed something, and re-run it. Is still showed the original TAP failures. |
Frob issues are fixed, landing |
The global packages path could cause tests to fail when it would be overriden to unexpected (in test setup) values. Remove most usage and make it a configuration on buildInfo, along with most other build information. Cleanup the asset builder to require the .packages path and the resident runners to no longer require it, since they already have the information in build_info. It needs to stick around for the fuchsia deps we do not control. Filled flutter#60232 for remaining work.
Description
The global packages path could cause tests to fail when it would be overriden to unexpected (in test setup) values. Remove most usage and make it a configuration on buildInfo, along with most other build information. Cleanup the asset builder to require the .packages path and the resident runners to no longer require it, since they already have the information in build_info.
It needs to stick around for the fuchsia deps we do not control.
Filled #60232 for remaining work.