re-enable verify only test failure and update deps. (#16090)

* re-enable verify-only failing test for out of sync deps and update deps to latest version
This commit is contained in:
Jonah Williams
2018-04-04 10:52:46 -07:00
committed by GitHub
parent 4658ec0f9c
commit 5125c43247
27 changed files with 63 additions and 54 deletions

View File

@@ -101,6 +101,7 @@ class UpdatePackagesCommand extends FlutterCommand {
final bool isVerifyOnly = argResults['verify-only'];
if (isVerifyOnly) {
bool needsUpdate = false;
printStatus('Verifying pubspecs...');
for (Directory directory in packages) {
final PubspecYaml pubspec = new PubspecYaml(directory);
@@ -108,10 +109,11 @@ class UpdatePackagesCommand extends FlutterCommand {
if (pubspec.checksum.value == -1) {
// If the checksum is invalid or missing, we can just ask them run to run
// upgrade again to compute it.
printStatus(
printError(
'Warning: pubspec in ${directory.path} has out of date dependencies. '
'Please run "flutter update-packages" --force-upgrade to update them correctly.'
'Please run "flutter update-packages --force-upgrade" to update them correctly.'
);
needsUpdate = true;
}
// all dependencies in the pubspec sorted lexically.
final Set<String> checksumDependencies = new Set<String>();
@@ -135,6 +137,13 @@ class UpdatePackagesCommand extends FlutterCommand {
printStatus('pubspec in ${directory.path} is up to date!');
}
}
if (needsUpdate) {
throwToolExit(
'Warning: one or more pubspecs have invalid dependencies. '
'Please run "flutter update-packages --force-upgrade" to update them correctly.',
exitCode: 1,
);
}
return;
}

View File

@@ -65,7 +65,7 @@ dependencies:
path: 1.5.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
petitparser: 1.7.6 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
pool: 1.3.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
pub_semver: 1.3.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
pub_semver: 1.3.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
shelf: 0.7.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
shelf_packages_handler: 1.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
shelf_static: 0.2.7 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@@ -95,4 +95,4 @@ dependency_overrides:
kernel:
path: ../../bin/cache/dart-sdk/lib/kernel
# PUBSPEC CHECKSUM: 538
# PUBSPEC CHECKSUM: b639