[flutter_tools] reland: cache pub invocations (#70180)

Disabled caching of pub invocations on flutter drive.
This commit is contained in:
Jonah Williams
2020-11-10 13:56:36 -08:00
committed by GitHub
parent 191d0aa4b6
commit fb28ee2860
5 changed files with 302 additions and 1 deletions

View File

@@ -467,6 +467,9 @@ abstract class FlutterCommand extends Command<void> {
);
}
/// Whether it is safe for this command to use a cached pub invocation.
bool get cachePubGet => true;
Duration get deviceDiscoveryTimeout {
if (_deviceDiscoveryTimeout == null
&& argResults.options.contains(FlutterOptions.kDeviceTimeout)
@@ -1057,6 +1060,7 @@ abstract class FlutterCommand extends Command<void> {
await pub.get(
context: PubContext.getVerifyContext(name),
generateSyntheticPackage: project.manifest.generateSyntheticPackage,
checkUpToDate: cachePubGet,
);
await project.regeneratePlatformSpecificTooling();
}