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/test/java/com/google/devtools/build/lib/skyframe/SkylarkImportLookupFunctionTest.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/test/java/com/google/devtools/build/lib/skyframe/SkylarkImportLookupFunctionTest.java')
-rw-r--r-- | src/test/java/com/google/devtools/build/lib/skyframe/SkylarkImportLookupFunctionTest.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/skyframe/SkylarkImportLookupFunctionTest.java b/src/test/java/com/google/devtools/build/lib/skyframe/SkylarkImportLookupFunctionTest.java index 449edef05d..a386a8042c 100644 --- a/src/test/java/com/google/devtools/build/lib/skyframe/SkylarkImportLookupFunctionTest.java +++ b/src/test/java/com/google/devtools/build/lib/skyframe/SkylarkImportLookupFunctionTest.java @@ -26,6 +26,7 @@ import com.google.devtools.build.lib.packages.ConstantRuleVisibility; import com.google.devtools.build.lib.pkgcache.PackageCacheOptions; import com.google.devtools.build.lib.pkgcache.PathPackageLocator; import com.google.devtools.build.lib.skyframe.util.SkyframeExecutorTestUtils; +import com.google.devtools.build.lib.syntax.SkylarkSemanticsOptions; import com.google.devtools.build.lib.util.BlazeClock; import com.google.devtools.build.lib.util.io.TimestampGranularityMonitor; import com.google.devtools.build.lib.vfs.Path; @@ -56,6 +57,7 @@ public class SkylarkImportLookupFunctionTest extends BuildViewTestCase { .preparePackageLoading( new PathPackageLocator(outputBase, ImmutableList.of(rootDirectory, alternativeRoot)), packageCacheOptions, + Options.getDefaults(SkylarkSemanticsOptions.class), "", UUID.randomUUID(), ImmutableMap.<String, String>of(), |