Skip to content

Commit 006fd0c

Browse files
jakemac53commit-bot@chromium.org
authored andcommitted
Actually set experiment flags to fix invalidation
Previously we were just getting the default experiment flags (regardless of the arg), which never matched any experiments passed in, so we always threw away the world. I also added invalidation based on experiment flags for DDC. This gives overall ~20% initial build time reduction for flutter gallery, and ~30% for angular_components_example. Change-Id: I578d9611b89d3776e45ae8d309cfe8f70c7b7edd Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107188 Commit-Queue: Jake Macdonald <jakemac@google.com> Reviewed-by: Vijay Menon <vsm@google.com> Auto-Submit: Jake Macdonald <jakemac@google.com>
1 parent 29c0341 commit 006fd0c

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

pkg/front_end/lib/src/api_unstable/bazel_worker.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,8 @@ Future<InitializedCompilerState> initializeIncrementalCompiler(
105105
..target = target
106106
..fileSystem = fileSystem
107107
..omitPlatform = true
108-
..environmentDefines = const {};
108+
..environmentDefines = const {}
109+
..experimentalFlags = experimentalFlags;
109110

110111
processedOpts = new ProcessedOptions(options: options);
111112
cachedSdkInput = WorkerInputComponent(

pkg/front_end/lib/src/api_unstable/ddc.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,8 @@ Future<InitializedCompilerState> initializeIncrementalCompiler(
155155
oldState.incrementalCompiler == null ||
156156
oldState.options.compileSdk != compileSdk ||
157157
cachedSdkInput == null ||
158-
!digestsEqual(cachedSdkInput.digest, sdkDigest)) {
158+
!digestsEqual(cachedSdkInput.digest, sdkDigest) ||
159+
!equalMaps(oldState.options.experimentalFlags, experiments)) {
159160
// No previous state.
160161
options = new CompilerOptions()
161162
..compileSdk = compileSdk

0 commit comments

Comments
 (0)