Skip to content

suppress pub override warning; decouple the analyzer versions - #5991

Merged
devoncarew merged 2 commits into
flutter:masterfrom
devoncarew:analyzer_version
Sep 22, 2016
Merged

devoncarew merged 2 commits into
flutter:masterfrom
devoncarew:analyzer_version

Conversation

@devoncarew

Copy link
Copy Markdown
Contributor

A different attempt at fixing #5925:

  • suppress the pub override warning in bin/flutter and in flutter_tools/lib/src/dart/pub.dart
  • leave the analyzer override in the pubspec for flutter_tools; this is the only package we have that uses the analyzer API directly
  • let the analyzer version float in devicelab/pubspec.yaml and flutter_test/pubspec.yaml; we get the version that package:test specifies that it needs in its pubspec
  • (also pass in --no-packages-dir in bin/flutter, to mirror what we do when driving pub from dart code)

I think allowing the analyzer version to be different - that used by flutter_tools, and that used by packages that user code will depend on - is ok. flutter_tools is generally just a snapshot that users interact with, not something they're actively importing into their codebase. And this lets us use the exact same version of the analyzer as the SDK tools, which is nice - we won't have any version skew between analysis server based products and flutter analyze.

@danrubel @Hixie @abarth @pq

@abarth

abarth commented Sep 22, 2016

Copy link
Copy Markdown
Contributor

LGTM assuming "flutter analyze --flutter-repo" still works. (That command gets mad if we have version mismatches.) I'm pretty sure travis runs that check, so it must be ok. Thanks!

@pq

pq commented Sep 22, 2016

Copy link
Copy Markdown
Contributor

Awesome. Thanks for following this thread. It didn't occur to me to selectively unpin the dep but that's effectively what we're doing so this makes perfect sense.

LGTM!

@devoncarew

Copy link
Copy Markdown
Contributor Author

flutter analyze --flutter-repo

Yup, that still works, and the update-packages command as well.

selectively unpin the dep

Yeah, making that decision definitely makes the problem simpler.

@devoncarew
devoncarew merged commit 8755e56 into flutter:master Sep 22, 2016
Comment thread bin/flutter
echo Building flutter tool...
FLUTTER_DIR="$FLUTTER_ROOT/packages/flutter"
(cd "$FLUTTER_TOOLS_DIR"; "../../bin/cache/dart-sdk/bin/pub" get --verbosity=warning)
(cd "$FLUTTER_TOOLS_DIR"; "../../bin/cache/dart-sdk/bin/pub" get --verbosity=error --no-packages-dir)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

what other warnings might this one day mute? I'm worried we're going to miss early warnings of potential breakage...

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Aug 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants