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