Skip to content

Conversation

jonahwilliams
Copy link
Contributor

@jonahwilliams jonahwilliams commented Jun 24, 2020

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.

@fluttergithubbot fluttergithubbot added tool Affects the "flutter" command-line tool. See also t: labels. work in progress; do not review labels Jun 24, 2020
@jonahwilliams jonahwilliams marked this pull request as ready for review June 24, 2020 20:25
@jonahwilliams
Copy link
Contributor Author

I'm gonna live dangerously and let frob tell me if this is breaking :)

@jonahwilliams jonahwilliams requested a review from jmagman June 24, 2020 20:26
const String kPackagesFileName = '.packages';

String get globalPackagesPath => _globalPackagesPath ?? kPackagesFileName;
String get globalPackagesPathDepreactedNoUse => _globalPackagesPath ?? kPackagesFileName;
Copy link
Member

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?

Copy link
Contributor Author

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 ?

Copy link
Contributor Author

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

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's annoying.

Copy link
Member

@jmagman jmagman left a 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;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's annoying.

@flutter-github-sync
Copy link

Started Google testing for this PR

1 similar comment
@flutter-github-sync
Copy link

Started Google testing for this PR

@flutter-github-sync
Copy link

Google testing failed...

@jonahwilliams
Copy link
Contributor Author

Fixed, name is referenced in google3

@flutter-github-sync
Copy link

Started Google testing for this PR

1 similar comment
@flutter-github-sync
Copy link

Started Google testing for this PR

@flutter-github-sync
Copy link

Google testing failed...

@jonahwilliams
Copy link
Contributor Author

FYI @renyou , it looks like the second run didn't actually trigger another presubmit, instead it surfaced warnings from the first roll

@jmagman
Copy link
Member

jmagman commented Jun 25, 2020

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.

@jonahwilliams
Copy link
Contributor Author

Frob issues are fixed, landing

@jonahwilliams jonahwilliams merged commit 82a6f9b into flutter:master Jun 25, 2020
@jonahwilliams jonahwilliams deleted the remove_global_packages_path branch June 25, 2020 19:52
mingwandroid pushed a commit to mingwandroid/flutter that referenced this pull request Sep 6, 2020
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.
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants