Commit Graph

22 Commits

Author SHA1 Message Date
Chris Bracken
cf5778810b
Move script snapshot argumtents to Snapshotter (#16722)
This moves --vm_snapshot_data and --isolate_snapshot_data argument
hardcoding from GenSnapshot (a minimal wrapper around gen_snapshot
invocations) to Snapshotter.buildScriptSnapshot(). These arguments are
present in both AOT and script snapshots, but differ semantically: for
script snapshots they're inputs from the host engine artifacts
directory, for AOT snapshots they're outputs to the build directory.
2018-04-19 16:03:07 -07:00
Todd Volkert
f8058d7fb2
Make AppContext API not be prone to Future oddities (#16034)
Follow-up comments to #15984
2018-03-28 15:17:29 -07:00
Todd Volkert
8d11f5c763
Make AppContext immutable and race-free (#15984)
This updates AppContext per the recommendations in #15352

Fixes #15352
2018-03-28 10:58:28 -07:00
Jason Simmons
466d15433f
Use Dart 2 camel case constants (#15360) 2018-03-12 11:06:32 -07:00
Mikkel Nygaard Ravn
a1f03977ca Engine artifacts used for snapshots also specified as build inputs (#12014) 2017-09-12 08:35:02 +02:00
Mikkel Nygaard Ravn
14016523ed Ensure snapshot rebuild logic takes main path into account (#11924) 2017-09-07 14:45:42 +02:00
Chris Bracken
c896fe2f6e Invalidate snapshot when entrypoint changes (#11913)
Adds the app entrypoint as a key in the checksum file.

This change eliminates the assumption that checksummed files change when
the main entrypoint changes. In the case where there are two
entrypoints, a.dart and b.dart and a.dart imports b.dart and b.dart
imports a.dart, building the app with entrypoint a.dart followed by a
build of the app with entrypoint b.dart would result in the same
files list and checksums, but should invalidate the build.
2017-09-05 11:19:09 -07:00
Chris Bracken
4670c9266c Bugfix in build test: ensure prev snapshot exists (#11912)
Fix a test for build invalidation due to a change in main entry point.
Previously this test's build was always invalidated to the the lack of a
previous snapshot (as well as the change in checksums). This change
ensures that the build is invalidated only due to the change in
checksums.
2017-09-01 18:06:35 -07:00
Chris Bracken
b29680cccf Improve readability of build_test JSON (#11911) 2017-09-01 18:06:13 -07:00
Chris Bracken
27d3e8a41f Extract snapshotting logic to Snapshotter class (#11820)
Extract a Snapshotter class that can be shared between FLX snapshotting,
AOT snapshotting, and assembly AOT snapshotting. Allows for better
testability of snapshotting logic.

* Extracts script snapshotting used in FLX build.
* Adds tests for snapshot checksumming, build invalidation/skipping.

Remaining work: disentangle + extract AOT snapshotting and Assembly AOT
snapshotting logic from build_aot.dart.
2017-08-29 10:55:14 -07:00
Chris Bracken
10e65a16f8 Minor whitespace formatting fix in build tests (#11802) 2017-08-28 15:46:45 -07:00
Chris Bracken
1ee9400130 Avoid rebuilding snapshots if no change to source (#11551) (#11793)
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
2017-08-28 11:45:17 -07:00
Chris Bracken
fd54bd4caf Add version, build mode to the snapshot checksums (#11787)
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.
2017-08-25 14:32:01 -07:00
Ian Hickson
0799ff5b6c Revert "Revert "Rollback patch that broke microbenchmarks" (#11641)" (#11645)
This reverts commit 1705bf3c73.
2017-08-16 14:59:01 -07:00
Ian Hickson
1705bf3c73 Revert "Rollback patch that broke microbenchmarks" (#11641)
* 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.
2017-08-16 14:46:50 -07:00
Ian Hickson
70fe6f4c23 Rollback patch that broke microbenchmarks (#11616)
* 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.
2017-08-15 17:53:58 -07:00
Chris Bracken
309a2d78fb Extract snapshotting logic to Snapshotter class (#11591)
First step in eliminating code duplication between script snapshotting
(in FLX build) and AOT, assembly AOT snapshotting.
2017-08-11 12:58:35 -07:00
Chris Bracken
bf69c3c69b Minor whitespace formatting fix (#11590)
Adds some missing spaces.
2017-08-10 16:52:25 -07:00
Chris Bracken
74835db563 Avoid rebuilding snapshots if no change to source (#11551)
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.
2017-08-08 10:52:24 -07:00
Ian Hickson
3d5afb5a81 Revert "Skip AOT snapshot build if inputs are unchanged" (#11463)
* Revert "Support space- and backslash-escaped dependencies (#11090)"

This reverts commit e6bafd0bdb.

* Revert "Skip AOT snapshot build if inputs are unchanged (#11084)"

This reverts commit b5e522e200.
2017-08-01 16:46:24 -07:00
Chris Bracken
e6bafd0bdb Support space- and backslash-escaped dependencies (#11090)
Snapshot dependency files now backslash-escape dependency paths
containing spaces and backslashes.

See: https://codereview.chromium.org/2966903003/
2017-07-05 16:36:12 -07:00
Chris Bracken
1438ae85a3 Skip snapshot build if inputs are unchanged (#11047)
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.
2017-06-30 16:09:48 -07:00