[flutter_tools] Reland: simplify pub cache logic (#67589)
There have been some more additional reports of a missing 'package:characters' import after upgrading flutter. This has me concerned that our pub caching logic is incorrect. Instead of the tool attempting to guess when pub should be run, always delegate to pub. Also takes an opportunity to fix the kernel snapshot depending on the .packages or package_config. Due to the generated: date field this causes extra rebuilds. Instead when pub get is run, write out an additional file with just the package contents and version. Fixes #66777 Fixes #65723
This commit is contained in:
@@ -982,9 +982,9 @@ abstract class FlutterCommand extends Command<void> {
|
||||
// First always update universal artifacts, as some of these (e.g.
|
||||
// ios-deploy on macOS) are required to determine `requiredArtifacts`.
|
||||
await globals.cache.updateAll(<DevelopmentArtifact>{DevelopmentArtifact.universal});
|
||||
|
||||
await globals.cache.updateAll(await requiredArtifacts);
|
||||
}
|
||||
Cache.releaseLock();
|
||||
|
||||
await validateCommand();
|
||||
|
||||
@@ -1011,11 +1011,7 @@ abstract class FlutterCommand extends Command<void> {
|
||||
context: PubContext.getVerifyContext(name),
|
||||
generateSyntheticPackage: project.manifest.generateSyntheticPackage,
|
||||
);
|
||||
// All done updating dependencies. Release the cache lock.
|
||||
Cache.releaseLock();
|
||||
await project.regeneratePlatformSpecificTooling();
|
||||
} else {
|
||||
Cache.releaseLock();
|
||||
}
|
||||
|
||||
setupApplicationPackages();
|
||||
|
||||
Reference in New Issue
Block a user