This change re-introduces skipping AOT snapshot builds if input sources
and outputs have not changed since the last snapshot build, assuming a
build for the same platform in the same build mode.
This reverts commit 3d5afb5a81.
It includes the following changes relative to the original:
1. Include the entrypoint source in the checksums
2. include the build mode in the checksums
3. include the target platform in the checksums
This change ensures that snapshot build checksums used to avoid
duplicate builds are invalidated by a change to framework revision
(in case gen_snapshot is updated), as well as by build mode.
Currently, only FLX snapshotting uses checksums to avoid duplicate
builds. FLX snapshotting is always done with BuildMode.debug, so didn't
include build mode in the checksum file.
* Revert "Fix a typo in the saved certificate error message (#11640)"
This reverts commit bfda885a9d.
* Revert "Rollback patch that broke microbenchmarks (#11616)"
This reverts commit 70fe6f4c23.
* Revert "Extract snapshotting logic to Snapshotter class (#11591)"
This reverts commit 309a2d78fb.
* Revert "Minor whitespace formatting fix (#11590)"
This reverts commit bf69c3c69b.
* Revert "Avoid rebuilding snapshots if no change to source (#11551)"
This reverts commit 74835db563.
This change re-introduces skipping snapshot builds if input sources (and
outputs) have not changed since the last snapshot build, with a bugfix
to include the entry-point source in the checksum used to check whether
rebuild can be skipped. This ensures that the following sequence
invalidates the cached build, resulting in two snapshot builds:
flutter build ios lib/foo.dart
flutter build ios lib/bar.dart
This reverts commit 3d5afb5a81.
Previously, the snapshot file was recomputed on every build. We now
record checksums for all snapshot inputs (which are catalogued in the
snapshot dependencies file output alongside the snapshot) and only
rebuild if the checksum for any input file has changed.