From b4f6e56720ea28857bbff106b446f11689722f51 Mon Sep 17 00:00:00 2001 From: Chris Bracken Date: Wed, 23 Aug 2017 12:10:52 -0700 Subject: [PATCH] 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 --- packages/flutter_tools/lib/src/flx.dart | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/flutter_tools/lib/src/flx.dart b/packages/flutter_tools/lib/src/flx.dart index 996b302340..18ef40c9e9 100644 --- a/packages/flutter_tools/lib/src/flx.dart +++ b/packages/flutter_tools/lib/src/flx.dart @@ -67,6 +67,7 @@ Future _createSnapshot({ final Checksum oldChecksum = new Checksum.fromJson(json); final Set 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 _createSnapshot({ try { final Set 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) {