[flutter_tools] bypass pubspec yaml content check when running pubdependencies (#66559)

Otherwise the heuristics we have may decide to skip running pub. We should consider reducing the number of dimensions of caching here to a single check optimized for the run/test case.
This commit is contained in:
Jonah Williams 2020-09-24 12:51:18 -07:00 committed by GitHub
parent ee6d4c6590
commit b9274c7c60
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -647,7 +647,7 @@ class PubDependencies extends ArtifactSet {
logger: _logger,
throwOnError: false,
);
if (packageConfig == null || packageConfig == PackageConfig.empty ) {
if (packageConfig == null || packageConfig == PackageConfig.empty) {
return false;
}
for (final Package package in packageConfig.packages) {
@ -667,6 +667,8 @@ class PubDependencies extends ArtifactSet {
context: PubContext.pubGet,
directory: _fileSystem.path.join(_flutterRoot(), 'packages', 'flutter_tools'),
generateSyntheticPackage: false,
skipPubspecYamlCheck: true,
checkLastModified: false,
);
}
}

View File

@ -744,6 +744,8 @@ void main() {
context: PubContext.pubGet,
directory: 'packages/flutter_tools',
generateSyntheticPackage: false,
skipPubspecYamlCheck: true,
checkLastModified: false,
)).called(1);
});
}