Commit b4f6e567 authored by Chris Bracken's avatar Chris Bracken Committed by GitHub

Include main entrypoint in FLX snapshot checksum (#11762)

During FLX snapshotting, changes to (or absence of) any of the following
should trigger re-snapshot:

  1. main() entrypoint source
  2. transitive closure of sources reachable from the entrypoint source
  3. the output snapshot
parent bb2554ab
......@@ -67,6 +67,7 @@ Future<int> _createSnapshot({
final Checksum oldChecksum = new Checksum.fromJson(json);
final Set<String> inputPaths = await _readDepfile(depfilePath);
inputPaths.add(snapshotPath);
inputPaths.add(mainPath);
final Checksum newChecksum = new Checksum.fromFiles(inputPaths);
if (oldChecksum == newChecksum) {
printTrace('Skipping snapshot build. Checksums match.');
......@@ -87,6 +88,7 @@ Future<int> _createSnapshot({
try {
final Set<String> inputPaths = await _readDepfile(depfilePath);
inputPaths.add(snapshotPath);
inputPaths.add(mainPath);
final Checksum checksum = new Checksum.fromFiles(inputPaths);
await checksumFile.writeAsString(checksum.toJson());
} catch (e, s) {
......
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