Commit a1f03977 authored by Mikkel Nygaard Ravn's avatar Mikkel Nygaard Ravn Committed by GitHub

Engine artifacts used for snapshots also specified as build inputs (#12014)

parent f2ab841a
......@@ -406,6 +406,9 @@ class FlutterTask extends BaseFlutterTask {
if (snapshotter != null) {
sources = sources.plus(snapshotter)
}
if (localEngineSrcPath != null) {
sources = sources.plus(project.files("$localEngineSrcPath/$localEngine"))
}
// Finally, add a dependency on pubspec.yaml as well.
return sources.plus(project.files('pubspec.yaml'))
}
......
......@@ -51,7 +51,6 @@ class GenSnapshot {
'--dependencies=$depfilePath',
'--print_snapshot_sizes',
]..addAll(additionalArgs);
final String snapshotterPath = artifacts.getArtifactPath(Artifact.genSnapshot, snapshotType.platform, snapshotType.mode);
return runCommandAndStreamOutput(<String>[snapshotterPath]..addAll(args));
}
......@@ -250,7 +249,7 @@ class Snapshotter {
await fs.file(fingerprintPath).writeAsString(fingerprint.toJson());
} catch (e, s) {
// Log exception and continue, this step is a performance improvement only.
print('Error during snapshot fingerprinting: $e\n$s');
printStatus('Error during snapshot fingerprinting: $e\n$s');
}
}
......@@ -260,6 +259,9 @@ class Snapshotter {
'targetPlatform': type.platform?.toString() ?? '',
'entryPoint': mainPath,
};
return new Fingerprint.fromBuildInputs(properties, inputFilePaths);
final List<String> pathsWithSnapshotData = inputFilePaths.toList()
..add(artifacts.getArtifactPath(Artifact.vmSnapshotData))
..add(artifacts.getArtifactPath(Artifact.isolateSnapshotData));
return new Fingerprint.fromBuildInputs(properties, pathsWithSnapshotData);
}
}
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