Unverified Commit 224f91e3 authored by Jonah Williams's avatar Jonah Williams Committed by GitHub

Revert "Eliminate snapshot, depfile opts from bundle cmd (#22495)" (#22519)

This reverts commit b07d986f.
parent b07d986f
...@@ -308,7 +308,7 @@ class AOTSnapshotter { ...@@ -308,7 +308,7 @@ class AOTSnapshotter {
sdkRoot: artifacts.getArtifactPath(Artifact.flutterPatchedSdkPath), sdkRoot: artifacts.getArtifactPath(Artifact.flutterPatchedSdkPath),
mainPath: mainPath, mainPath: mainPath,
outputFilePath: fs.path.join(outputPath, 'app.dill'), outputFilePath: fs.path.join(outputPath, 'app.dill'),
depfilePath: depfilePath, depFilePath: depfilePath,
extraFrontEndOptions: extraFrontEndOptions, extraFrontEndOptions: extraFrontEndOptions,
linkPlatformKernelIn: true, linkPlatformKernelIn: true,
aot: true, aot: true,
......
...@@ -35,7 +35,9 @@ Future<void> build({ ...@@ -35,7 +35,9 @@ Future<void> build({
BuildMode buildMode, BuildMode buildMode,
String mainPath = defaultMainPath, String mainPath = defaultMainPath,
String manifestPath = defaultManifestPath, String manifestPath = defaultManifestPath,
String snapshotPath,
String applicationKernelFilePath, String applicationKernelFilePath,
String depfilePath,
String privateKeyPath = defaultPrivateKeyPath, String privateKeyPath = defaultPrivateKeyPath,
String assetDirPath, String assetDirPath,
String packagesPath, String packagesPath,
...@@ -49,6 +51,8 @@ Future<void> build({ ...@@ -49,6 +51,8 @@ Future<void> build({
List<String> fileSystemRoots, List<String> fileSystemRoots,
String fileSystemScheme, String fileSystemScheme,
}) async { }) async {
snapshotPath ??= defaultSnapshotPath;
depfilePath ??= defaultDepfilePath;
assetDirPath ??= getAssetBuildDirectory(); assetDirPath ??= getAssetBuildDirectory();
packagesPath ??= fs.path.absolute(PackageMap.globalPackagesPath); packagesPath ??= fs.path.absolute(PackageMap.globalPackagesPath);
applicationKernelFilePath ??= defaultApplicationKernelPath; applicationKernelFilePath ??= defaultApplicationKernelPath;
...@@ -64,7 +68,7 @@ Future<void> build({ ...@@ -64,7 +68,7 @@ Future<void> build({
fs.path.absolute(getIncrementalCompilerByteStoreDirectory()), fs.path.absolute(getIncrementalCompilerByteStoreDirectory()),
mainPath: fs.file(mainPath).absolute.path, mainPath: fs.file(mainPath).absolute.path,
outputFilePath: applicationKernelFilePath, outputFilePath: applicationKernelFilePath,
depfilePath: defaultDepfilePath, depFilePath: depfilePath,
trackWidgetCreation: trackWidgetCreation, trackWidgetCreation: trackWidgetCreation,
extraFrontEndOptions: extraFrontEndOptions, extraFrontEndOptions: extraFrontEndOptions,
fileSystemRoots: fileSystemRoots, fileSystemRoots: fileSystemRoots,
......
...@@ -22,6 +22,8 @@ class BuildBundleCommand extends BuildSubCommand { ...@@ -22,6 +22,8 @@ class BuildBundleCommand extends BuildSubCommand {
..addOption('asset-base', help: 'Ignored. Will be removed.', hide: !verboseHelp) ..addOption('asset-base', help: 'Ignored. Will be removed.', hide: !verboseHelp)
..addOption('manifest', defaultsTo: defaultManifestPath) ..addOption('manifest', defaultsTo: defaultManifestPath)
..addOption('private-key', defaultsTo: defaultPrivateKeyPath) ..addOption('private-key', defaultsTo: defaultPrivateKeyPath)
..addOption('snapshot', defaultsTo: defaultSnapshotPath)
..addOption('depfile', defaultsTo: defaultDepfilePath)
..addOption('kernel-file', defaultsTo: defaultApplicationKernelPath) ..addOption('kernel-file', defaultsTo: defaultApplicationKernelPath)
..addOption('target-platform', ..addOption('target-platform',
defaultsTo: 'android-arm', defaultsTo: 'android-arm',
...@@ -91,7 +93,9 @@ class BuildBundleCommand extends BuildSubCommand { ...@@ -91,7 +93,9 @@ class BuildBundleCommand extends BuildSubCommand {
buildMode: buildMode, buildMode: buildMode,
mainPath: targetFile, mainPath: targetFile,
manifestPath: argResults['manifest'], manifestPath: argResults['manifest'],
snapshotPath: argResults['snapshot'],
applicationKernelFilePath: argResults['kernel-file'], applicationKernelFilePath: argResults['kernel-file'],
depfilePath: argResults['depfile'],
privateKeyPath: argResults['private-key'], privateKeyPath: argResults['private-key'],
assetDirPath: argResults['asset-dir'], assetDirPath: argResults['asset-dir'],
precompiledSnapshot: argResults['precompiled'], precompiledSnapshot: argResults['precompiled'],
......
...@@ -81,7 +81,7 @@ class KernelCompiler { ...@@ -81,7 +81,7 @@ class KernelCompiler {
String sdkRoot, String sdkRoot,
String mainPath, String mainPath,
String outputFilePath, String outputFilePath,
String depfilePath, String depFilePath,
bool linkPlatformKernelIn = false, bool linkPlatformKernelIn = false,
bool aot = false, bool aot = false,
bool trackWidgetCreation = false, bool trackWidgetCreation = false,
...@@ -100,16 +100,16 @@ class KernelCompiler { ...@@ -100,16 +100,16 @@ class KernelCompiler {
// Currently the compiler emits buildbot paths for the core libs in the // Currently the compiler emits buildbot paths for the core libs in the
// depfile. None of these are available on the local host. // depfile. None of these are available on the local host.
Fingerprinter fingerprinter; Fingerprinter fingerprinter;
if (depfilePath != null) { if (depFilePath != null) {
fingerprinter = Fingerprinter( fingerprinter = Fingerprinter(
fingerprintPath: '$depfilePath.fingerprint', fingerprintPath: '$depFilePath.fingerprint',
paths: <String>[mainPath], paths: <String>[mainPath],
properties: <String, String>{ properties: <String, String>{
'entryPoint': mainPath, 'entryPoint': mainPath,
'trackWidgetCreation': trackWidgetCreation.toString(), 'trackWidgetCreation': trackWidgetCreation.toString(),
'linkPlatformKernelIn': linkPlatformKernelIn.toString(), 'linkPlatformKernelIn': linkPlatformKernelIn.toString(),
}, },
depfilePaths: <String>[depfilePath], depfilePaths: <String>[depFilePath],
pathFilter: (String path) => !path.startsWith('/b/build/slave/'), pathFilter: (String path) => !path.startsWith('/b/build/slave/'),
); );
...@@ -154,8 +154,8 @@ class KernelCompiler { ...@@ -154,8 +154,8 @@ class KernelCompiler {
if (outputFilePath != null) { if (outputFilePath != null) {
command.addAll(<String>['--output-dill', outputFilePath]); command.addAll(<String>['--output-dill', outputFilePath]);
} }
if (depfilePath != null && (fileSystemRoots == null || fileSystemRoots.isEmpty)) { if (depFilePath != null && (fileSystemRoots == null || fileSystemRoots.isEmpty)) {
command.addAll(<String>['--depfile', depfilePath]); command.addAll(<String>['--depfile', depFilePath]);
} }
if (fileSystemRoots != null) { if (fileSystemRoots != null) {
for (String root in fileSystemRoots) { for (String root in fileSystemRoots) {
......
...@@ -169,7 +169,7 @@ Hello! ...@@ -169,7 +169,7 @@ Hello!
incrementalCompilerByteStorePath: anyNamed('incrementalCompilerByteStorePath'), incrementalCompilerByteStorePath: anyNamed('incrementalCompilerByteStorePath'),
mainPath: anyNamed('mainPath'), mainPath: anyNamed('mainPath'),
outputFilePath: anyNamed('outputFilePath'), outputFilePath: anyNamed('outputFilePath'),
depfilePath: anyNamed('depfilePath'), depFilePath: anyNamed('depFilePath'),
trackWidgetCreation: anyNamed('trackWidgetCreation'), trackWidgetCreation: anyNamed('trackWidgetCreation'),
extraFrontEndOptions: anyNamed('extraFrontEndOptions'), extraFrontEndOptions: anyNamed('extraFrontEndOptions'),
fileSystemRoots: anyNamed('fileSystemRoots'), fileSystemRoots: anyNamed('fileSystemRoots'),
......
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