Commit Graph

28 Commits

Author SHA1 Message Date
Chris Bracken
8c4f0c0d21
Eliminate build aot --interpreter flag (#17025)
This is required for iOS debug builds, but unused otherwise. In theory,
Android debug builds could be run in this mode, but this is historically
untested and adds unnecessary complexity to the code. If ad-hoc testing
is required, it can be patched in when necessary.
2018-04-26 16:07:10 -07:00
Chris Bracken
82f969ff05
Move AOT snapshotting to Snapshotter class (#17015)
This moves AOT snapshotting out of build_aot.dart and into the
Snapshotter class. It also adds unit tests for iOS debug, profile, and
release builds.
2018-04-26 14:37:39 -07:00
Chris Bracken
b45a260534
Make FakeGenSnapshot's outputs mutable for tests (#16976)
This simplifies tests by allowing the test author to express the outputs
they'd like the snapshotter to generate without creating a whole new
instance and context with the additional overrides.

Also sets the default set of outputs to none, setting them instead in
the setUp function for script snapshotting.
2018-04-25 20:50:33 -07:00
Chris Bracken
f570e046c9
Inline buildScriptSnapshot calls (#16940) 2018-04-24 16:07:14 -07:00
Chris Bracken
993f3947da
Generalise FakeGenSnapshot output generation (#16938)
Pre-factoring for addition of AOT snapshotting unit tests, which emit a
different set of expected outputs.
2018-04-24 15:51:10 -07:00
Chris Bracken
de8a53c55b
Rename buildSnapshot to buildScriptSnapshot (#16905)
Renames buildSnapshot to build buildScriptSnapshot in preparation for
AOT snapshot tests.
2018-04-23 16:51:34 -07:00
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