diff options
author | brandjon <brandjon@google.com> | 2017-04-27 18:34:33 +0200 |
---|---|---|
committer | Vladimir Moskva <vladmos@google.com> | 2017-04-28 01:01:31 +0200 |
commit | 7dc34167d797af692add7c87e6e14208efada585 (patch) | |
tree | 4a27819c133a06a0c2b8549e14c73f25e39ac044 /src/main/java/com/google/devtools/build/lib/skyframe/PrecomputedValue.java | |
parent | 4edc6422a5675a975168fab184b1a1d6aeaffc16 (diff) |
Store Skylark command-line flags in Skyframe
This is the first of two CLs for making command line options able to affect the Skylark interpreter. It introduces SkylarkSemanticsOptions, and stores it as a precomputed (injected) value in Skyframe. The next CL will read these options from Skyframe when constructing the Skylark environment.
This CL affects the dataflow from command/test initialization to Skyframe. Some code paths, like those used for testing, use the default SkylarkSemanticsOptions and therefore won't be able to use (for example) --incompatible_* flags. The call sites to update were found by searching for uses of defaultVisibility and working upward from there.
RELNOTES: None
PiperOrigin-RevId: 154432058
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/skyframe/PrecomputedValue.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/skyframe/PrecomputedValue.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/PrecomputedValue.java b/src/main/java/com/google/devtools/build/lib/skyframe/PrecomputedValue.java index 2619af2b39..d879c8f8b6 100644 --- a/src/main/java/com/google/devtools/build/lib/skyframe/PrecomputedValue.java +++ b/src/main/java/com/google/devtools/build/lib/skyframe/PrecomputedValue.java @@ -26,6 +26,7 @@ import com.google.devtools.build.lib.analysis.buildinfo.BuildInfoFactory.BuildIn import com.google.devtools.build.lib.packages.RuleVisibility; import com.google.devtools.build.lib.pkgcache.PathPackageLocator; import com.google.devtools.build.lib.skyframe.SkyframeActionExecutor.ConflictException; +import com.google.devtools.build.lib.syntax.SkylarkSemanticsOptions; import com.google.devtools.build.lib.util.Preconditions; import com.google.devtools.build.lib.vfs.PathFragment; import com.google.devtools.build.skyframe.Injectable; @@ -85,6 +86,9 @@ public final class PrecomputedValue implements SkyValue { public static final Precomputed<RuleVisibility> DEFAULT_VISIBILITY = new Precomputed<>(SkyKey.create(SkyFunctions.PRECOMPUTED, "default_visibility")); + public static final Precomputed<SkylarkSemanticsOptions> SKYLARK_SEMANTICS = + new Precomputed<>(SkyKey.create(SkyFunctions.PRECOMPUTED, "skylark_semantics")); + static final Precomputed<UUID> BUILD_ID = new Precomputed<>(SkyKey.create(SkyFunctions.PRECOMPUTED, "build_id")); |