Unverified Commit b5b55447 authored by Stanislav Baranov's avatar Stanislav Baranov Committed by GitHub

Remove unused snapshot.d depfile parameter (#20584)

parent 2c0329a1
...@@ -410,8 +410,7 @@ abstract class BaseFlutterTask extends DefaultTask { ...@@ -410,8 +410,7 @@ abstract class BaseFlutterTask extends DefaultTask {
@OutputFiles @OutputFiles
FileCollection getDependenciesFiles() { FileCollection getDependenciesFiles() {
// For AOT and Core JIT builds, include the gen_snapshot depfile. FileCollection depfiles = project.files()
FileCollection depfiles = project.files("${intermediateDir}/snapshot.d")
if (previewDart2) { if (previewDart2) {
// For Dart 2, also include the kernel compiler depfile, since // For Dart 2, also include the kernel compiler depfile, since
// kernel compile is the first stage of AOT build in this mode, // kernel compile is the first stage of AOT build in this mode,
......
...@@ -44,7 +44,6 @@ class GenSnapshot { ...@@ -44,7 +44,6 @@ class GenSnapshot {
Future<int> run({ Future<int> run({
@required SnapshotType snapshotType, @required SnapshotType snapshotType,
@required String packagesPath, @required String packagesPath,
@required String depfilePath,
IOSArch iosArch, IOSArch iosArch,
Iterable<String> additionalArgs = const <String>[], Iterable<String> additionalArgs = const <String>[],
}) { }) {
...@@ -121,7 +120,6 @@ class ScriptSnapshotter { ...@@ -121,7 +120,6 @@ class ScriptSnapshotter {
final int exitCode = await genSnapshot.run( final int exitCode = await genSnapshot.run(
snapshotType: snapshotType, snapshotType: snapshotType,
packagesPath: packagesPath, packagesPath: packagesPath,
depfilePath: depfilePath,
additionalArgs: args, additionalArgs: args,
); );
...@@ -260,7 +258,7 @@ class AOTSnapshotter { ...@@ -260,7 +258,7 @@ class AOTSnapshotter {
'sharedLib': buildSharedLibrary.toString(), 'sharedLib': buildSharedLibrary.toString(),
'extraGenSnapshotOptions': extraGenSnapshotOptions.join(' '), 'extraGenSnapshotOptions': extraGenSnapshotOptions.join(' '),
}, },
depfilePaths: <String>[depfilePath], depfilePaths: <String>[],
); );
if (await fingerprinter.doesFingerprintMatch()) { if (await fingerprinter.doesFingerprintMatch()) {
printTrace('Skipping AOT snapshot build. Fingerprint match.'); printTrace('Skipping AOT snapshot build. Fingerprint match.');
...@@ -271,7 +269,6 @@ class AOTSnapshotter { ...@@ -271,7 +269,6 @@ class AOTSnapshotter {
final int genSnapshotExitCode = await genSnapshot.run( final int genSnapshotExitCode = await genSnapshot.run(
snapshotType: snapshotType, snapshotType: snapshotType,
packagesPath: packageMap.packagesPath, packagesPath: packageMap.packagesPath,
depfilePath: depfilePath,
additionalArgs: genSnapshotArgs, additionalArgs: genSnapshotArgs,
iosArch: iosArch, iosArch: iosArch,
); );
...@@ -283,7 +280,7 @@ class AOTSnapshotter { ...@@ -283,7 +280,7 @@ class AOTSnapshotter {
// Write path to gen_snapshot, since snapshots have to be re-generated when we roll // Write path to gen_snapshot, since snapshots have to be re-generated when we roll
// the Dart SDK. // the Dart SDK.
final String genSnapshotPath = GenSnapshot.getSnapshotterPath(snapshotType); final String genSnapshotPath = GenSnapshot.getSnapshotterPath(snapshotType);
await outputDir.childFile('gen_snapshot.d').writeAsString('snapshot.d: $genSnapshotPath\n'); await outputDir.childFile('gen_snapshot.d').writeAsString('gen_snapshot.d: $genSnapshotPath\n');
// On iOS, we use Xcode to compile the snapshot into a dynamic library that the // On iOS, we use Xcode to compile the snapshot into a dynamic library that the
// end-developer can link into their app. // end-developer can link into their app.
...@@ -498,7 +495,7 @@ class CoreJITSnapshotter { ...@@ -498,7 +495,7 @@ class CoreJITSnapshotter {
'entryPoint': mainPath, 'entryPoint': mainPath,
'extraGenSnapshotOptions': extraGenSnapshotOptions.join(' '), 'extraGenSnapshotOptions': extraGenSnapshotOptions.join(' '),
}, },
depfilePaths: <String>[depfilePath], depfilePaths: <String>[],
); );
if (await fingerprinter.doesFingerprintMatch()) { if (await fingerprinter.doesFingerprintMatch()) {
printTrace('Skipping Core JIT snapshot build. Fingerprint match.'); printTrace('Skipping Core JIT snapshot build. Fingerprint match.');
...@@ -509,7 +506,6 @@ class CoreJITSnapshotter { ...@@ -509,7 +506,6 @@ class CoreJITSnapshotter {
final int genSnapshotExitCode = await genSnapshot.run( final int genSnapshotExitCode = await genSnapshot.run(
snapshotType: snapshotType, snapshotType: snapshotType,
packagesPath: packagesPath, packagesPath: packagesPath,
depfilePath: depfilePath,
additionalArgs: genSnapshotArgs, additionalArgs: genSnapshotArgs,
); );
if (genSnapshotExitCode != 0) { if (genSnapshotExitCode != 0) {
...@@ -520,7 +516,7 @@ class CoreJITSnapshotter { ...@@ -520,7 +516,7 @@ class CoreJITSnapshotter {
// Write path to gen_snapshot, since snapshots have to be re-generated when we roll // Write path to gen_snapshot, since snapshots have to be re-generated when we roll
// the Dart SDK. // the Dart SDK.
final String genSnapshotPath = GenSnapshot.getSnapshotterPath(snapshotType); final String genSnapshotPath = GenSnapshot.getSnapshotterPath(snapshotType);
await outputDir.childFile('gen_snapshot.d').writeAsString('snapshot.d: $genSnapshotPath\n'); await outputDir.childFile('gen_snapshot.d').writeAsString('gen_snapshot.d: $genSnapshotPath\n');
// Compute and record build fingerprint. // Compute and record build fingerprint.
await fingerprinter.writeFingerprint(); await fingerprinter.writeFingerprint();
......
...@@ -164,7 +164,6 @@ void main() { ...@@ -164,7 +164,6 @@ void main() {
expect(genSnapshot.snapshotType.platform, isNull); expect(genSnapshot.snapshotType.platform, isNull);
expect(genSnapshot.snapshotType.mode, BuildMode.debug); expect(genSnapshot.snapshotType.mode, BuildMode.debug);
expect(genSnapshot.packagesPath, '.packages'); expect(genSnapshot.packagesPath, '.packages');
expect(genSnapshot.depfilePath, 'output.snapshot.d');
expect(genSnapshot.additionalArgs, <String>[ expect(genSnapshot.additionalArgs, <String>[
'--snapshot_kind=script', '--snapshot_kind=script',
'--script_snapshot=output.snapshot', '--script_snapshot=output.snapshot',
......
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