Commit 8755e569 authored by Devon Carew's avatar Devon Carew Committed by GitHub

suppress pub override warning; decouple the analyzer versions (#5991)

* suppress warning; decouple the analyzer versions

* also pass in --no-packages-dir
parent 8a186f3b
...@@ -41,7 +41,7 @@ DART="$DART_SDK_PATH/bin/dart" ...@@ -41,7 +41,7 @@ DART="$DART_SDK_PATH/bin/dart"
echo Building flutter tool... echo Building flutter tool...
FLUTTER_DIR="$FLUTTER_ROOT/packages/flutter" 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)
"$DART" --snapshot="$SNAPSHOT_PATH" --packages="$FLUTTER_TOOLS_DIR/.packages" "$SCRIPT_PATH" "$DART" --snapshot="$SNAPSHOT_PATH" --packages="$FLUTTER_TOOLS_DIR/.packages" "$SCRIPT_PATH"
echo $REVISION > "$STAMP_PATH" echo $REVISION > "$STAMP_PATH"
fi fi
......
...@@ -13,15 +13,7 @@ dependencies: ...@@ -13,15 +13,7 @@ dependencies:
path: ^1.3.0 path: ^1.3.0
stack_trace: ^1.4.0 stack_trace: ^1.4.0
vm_service_client: '^0.2.0' vm_service_client: '^0.2.0'
# Pulled in via dependency_override below.
analyzer: any
dev_dependencies: dev_dependencies:
# See packages/flutter_test/pubspec.yaml for why we're pinning this version. # See packages/flutter_test/pubspec.yaml for why we're pinning this version.
test: 0.12.15+4 test: 0.12.15+4
# See packages/flutter_test/pubspec.yaml for why we're using an override.
dependency_overrides:
analyzer:
path: ../../bin/cache/dart-sdk/lib/analyzer
...@@ -7,14 +7,5 @@ dependencies: ...@@ -7,14 +7,5 @@ dependencies:
# here we pin it precisely to avoid version skew across our packages. # here we pin it precisely to avoid version skew across our packages.
test: 0.12.15+4 test: 0.12.15+4
# We don't actually depend on 'analyzer', but 'test' and 'flutter_tools' do.
# Like 'flutter_tools', we use the version of the analyzer in the vended Dart
# SDK as defined in the `dependency_overrides` below.
analyzer: any
flutter: flutter:
path: ../flutter path: ../flutter
dependency_overrides:
analyzer:
path: ../../bin/cache/dart-sdk/lib/analyzer
...@@ -49,7 +49,8 @@ Future<int> pubGet({ ...@@ -49,7 +49,8 @@ Future<int> pubGet({
Status status = logger.startProgress("Running 'pub $command' in ${path.basename(directory)}..."); Status status = logger.startProgress("Running 'pub $command' in ${path.basename(directory)}...");
int code = await runCommandAndStreamOutput( int code = await runCommandAndStreamOutput(
<String>[sdkBinaryName('pub'), '--verbosity=warning', command, '--no-packages-dir', '--no-precompile'], <String>[sdkBinaryName('pub'), '--verbosity=warning', command, '--no-packages-dir', '--no-precompile'],
workingDirectory: directory workingDirectory: directory,
mapFunction: _filterOverrideWarnings
); );
status.stop(showElapsedTime: true); status.stop(showElapsedTime: true);
if (code != 0) if (code != 0)
...@@ -62,3 +63,15 @@ Future<int> pubGet({ ...@@ -62,3 +63,15 @@ Future<int> pubGet({
printError('$directory: pubspec.yaml and .packages are in an inconsistent state'); printError('$directory: pubspec.yaml and .packages are in an inconsistent state');
return 1; return 1;
} }
String _filterOverrideWarnings(String str) {
// Warning: You are using these overridden dependencies:
// ! analyzer 0.29.0-alpha.0 from path ../../bin/cache/dart-sdk/lib/analyzer
if (str.contains('overridden dependencies:'))
return null;
if (str.startsWith('! analyzer '))
return null;
return str;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment