The great Skylark -> Starlark class migration:
AndroidSkylarkData
JavaSkylarkCommon
SkylarkCcCommonTest
PiperOrigin-RevId: 307460994
diff --git a/src/test/java/com/google/devtools/build/lib/skylark/SkylarkIntegrationTest.java b/src/test/java/com/google/devtools/build/lib/skylark/SkylarkIntegrationTest.java
index 959a013..39a13e5 100644
--- a/src/test/java/com/google/devtools/build/lib/skylark/SkylarkIntegrationTest.java
+++ b/src/test/java/com/google/devtools/build/lib/skylark/SkylarkIntegrationTest.java
@@ -178,7 +178,7 @@
// Required since we have a new WORKSPACE file.
invalidatePackages(true);
- setSkylarkSemanticsOptions("--experimental_sibling_repository_layout");
+ setStarlarkSemanticsOptions("--experimental_sibling_repository_layout");
ConfiguredTarget myTarget = getConfiguredTarget("@r//:t");
String result = (String) getMyInfoFromTarget(myTarget).getValue("result");
@@ -630,7 +630,7 @@
@Test
public void testCannotSpecifyRunfilesWithDataOrDefaultRunfiles_struct() throws Exception {
- setSkylarkSemanticsOptions("--incompatible_disallow_struct_provider_syntax=false");
+ setStarlarkSemanticsOptions("--incompatible_disallow_struct_provider_syntax=false");
scratch.file(
"test/skylark/extension.bzl",
"def custom_rule_impl(ctx):",
@@ -699,7 +699,7 @@
@Test
public void testInstrumentedFilesProviderWithCodeCoverageDisabled() throws Exception {
- setSkylarkSemanticsOptions("--incompatible_disallow_struct_provider_syntax=false");
+ setStarlarkSemanticsOptions("--incompatible_disallow_struct_provider_syntax=false");
scratch.file(
"test/skylark/extension.bzl",
"def custom_rule_impl(ctx):",
@@ -732,7 +732,7 @@
@Test
public void testInstrumentedFilesProviderWithCodeCoverageEnabled() throws Exception {
- setSkylarkSemanticsOptions("--incompatible_disallow_struct_provider_syntax=false");
+ setStarlarkSemanticsOptions("--incompatible_disallow_struct_provider_syntax=false");
scratch.file(
"test/skylark/extension.bzl",
"def custom_rule_impl(ctx):",
@@ -766,7 +766,7 @@
@Test
public void testInstrumentedFilesInfo_coverageDisabled() throws Exception {
- setSkylarkSemanticsOptions("--incompatible_disallow_struct_provider_syntax=false");
+ setStarlarkSemanticsOptions("--incompatible_disallow_struct_provider_syntax=false");
scratch.file(
"test/skylark/extension.bzl",
"def custom_rule_impl(ctx):",
@@ -2225,7 +2225,7 @@
@Test
public void testBuildSettingRule_flag() throws Exception {
- setSkylarkSemanticsOptions("--experimental_build_setting_api=true");
+ setStarlarkSemanticsOptions("--experimental_build_setting_api=true");
scratch.file("test/rules.bzl",
"def _impl(ctx): return None",
@@ -2246,7 +2246,7 @@
@Test
public void testBuildSettingRule_settingByDefault() throws Exception {
- setSkylarkSemanticsOptions("--experimental_build_setting_api=true");
+ setStarlarkSemanticsOptions("--experimental_build_setting_api=true");
scratch.file("test/rules.bzl",
"def _impl(ctx): return None",
@@ -2267,7 +2267,7 @@
@Test
public void testBuildSettingRule_settingByFlagParameter() throws Exception {
- setSkylarkSemanticsOptions("--experimental_build_setting_api=true");
+ setStarlarkSemanticsOptions("--experimental_build_setting_api=true");
scratch.file("test/rules.bzl",
"def _impl(ctx): return None",
@@ -2289,7 +2289,7 @@
@Test
public void testBuildSettingRule_noDefault() throws Exception {
- setSkylarkSemanticsOptions("--experimental_build_setting_api=true");
+ setStarlarkSemanticsOptions("--experimental_build_setting_api=true");
scratch.file("test/rules.bzl",
"def _impl(ctx): return None",
@@ -2307,7 +2307,7 @@
@Test
public void testBuildSettingRule_errorsWithoutExperimentalFlag() throws Exception {
- setSkylarkSemanticsOptions("--experimental_build_setting_api=false");
+ setStarlarkSemanticsOptions("--experimental_build_setting_api=false");
scratch.file(
"test/rules.bzl",
@@ -2589,7 +2589,7 @@
"load('//test:rules.bzl', 'my_rule', 'simple_rule')",
"my_rule(name = 'my_rule', dep = ':dep')",
"simple_rule(name = 'dep')");
- setSkylarkSemanticsOptions("--experimental_starlark_config_transitions");
+ setStarlarkSemanticsOptions("--experimental_starlark_config_transitions");
reporter.removeHandler(failFastHandler);
getConfiguredTarget("//test:my_rule");
@@ -2598,7 +2598,7 @@
@Test
public void testPrintFromTransitionImpl() throws Exception {
- setSkylarkSemanticsOptions("--experimental_starlark_config_transitions");
+ setStarlarkSemanticsOptions("--experimental_starlark_config_transitions");
scratch.file(
"tools/whitelists/function_transition_whitelist/BUILD",
"package_group(",
@@ -2650,7 +2650,7 @@
@Test
public void testTransitionEquality() throws Exception {
- setSkylarkSemanticsOptions("--experimental_starlark_config_transitions");
+ setStarlarkSemanticsOptions("--experimental_starlark_config_transitions");
scratch.file(
"tools/whitelists/function_transition_whitelist/BUILD",
"package_group(",
@@ -2739,7 +2739,7 @@
"load('//test:rules.bzl', 'my_rule', 'simple_rule')",
"my_rule(name = 'my_rule', dep = ':dep')",
"simple_rule(name = 'dep')");
- setSkylarkSemanticsOptions("--experimental_starlark_config_transitions");
+ setStarlarkSemanticsOptions("--experimental_starlark_config_transitions");
reporter.removeHandler(failFastHandler);
getConfiguredTarget("//test:my_rule");
@@ -2751,7 +2751,7 @@
// Note that attr.license is deprecated, and thus this test is subject to imminent removal.
// (See --incompatible_no_attr_license). However, this verifies that until the attribute
// is removed, values of the attribute are a valid Starlark type.
- setSkylarkSemanticsOptions("--incompatible_no_attr_license=false");
+ setStarlarkSemanticsOptions("--incompatible_no_attr_license=false");
scratch.file(
"test/rule.bzl",
"def _my_rule_impl(ctx): ",
@@ -2790,7 +2790,7 @@
@Test
public void testDisallowStructProviderSyntax() throws Exception {
- setSkylarkSemanticsOptions("--incompatible_disallow_struct_provider_syntax=true");
+ setStarlarkSemanticsOptions("--incompatible_disallow_struct_provider_syntax=true");
scratch.file(
"test/skylark/extension.bzl",
"def custom_rule_impl(ctx):",
@@ -2813,7 +2813,7 @@
@Test
public void testDisableTargetProviderFields() throws Exception {
- setSkylarkSemanticsOptions("--incompatible_disable_target_provider_fields=true");
+ setStarlarkSemanticsOptions("--incompatible_disable_target_provider_fields=true");
scratch.file(
"test/skylark/rule.bzl",
"MyProvider = provider()",
@@ -2849,7 +2849,7 @@
// --incompatible_disable_target_provider_fields.
@Test
public void testDisableTargetProviderFields_actionsField() throws Exception {
- setSkylarkSemanticsOptions("--incompatible_disable_target_provider_fields=true");
+ setStarlarkSemanticsOptions("--incompatible_disable_target_provider_fields=true");
scratch.file(
"test/skylark/rule.bzl",
"MyProvider = provider()",
@@ -2877,7 +2877,7 @@
@Test
public void testDisableTargetProviderFields_disabled() throws Exception {
- setSkylarkSemanticsOptions("--incompatible_disable_target_provider_fields=false");
+ setStarlarkSemanticsOptions("--incompatible_disable_target_provider_fields=false");
scratch.file(
"test/skylark/rule.bzl",
"MyProvider = provider()",
@@ -2905,7 +2905,7 @@
@Test
public void testNoRuleOutputsParam() throws Exception {
- setSkylarkSemanticsOptions("--incompatible_no_rule_outputs_param=true");
+ setStarlarkSemanticsOptions("--incompatible_no_rule_outputs_param=true");
scratch.file(
"test/skylark/test_rule.bzl",
"def _impl(ctx):",
@@ -2929,7 +2929,7 @@
@Test
public void testExecutableNotInRunfiles() throws Exception {
- setSkylarkSemanticsOptions("--incompatible_disallow_struct_provider_syntax=false");
+ setStarlarkSemanticsOptions("--incompatible_disallow_struct_provider_syntax=false");
scratch.file(
"test/skylark/test_rule.bzl",
"def _my_rule_impl(ctx):",
@@ -2951,7 +2951,7 @@
@Test
public void testCommandStringList() throws Exception {
- setSkylarkSemanticsOptions("--incompatible_run_shell_command_string");
+ setStarlarkSemanticsOptions("--incompatible_run_shell_command_string");
scratch.file(
"test/skylark/test_rule.bzl",
"def _my_rule_impl(ctx):",
@@ -3080,7 +3080,7 @@
@Test
public void testUnknownStringEscapesForbidden() throws Exception {
- setSkylarkSemanticsOptions("--incompatible_restrict_string_escapes=true");
+ setStarlarkSemanticsOptions("--incompatible_restrict_string_escapes=true");
scratch.file("test/extension.bzl", "y = \"\\z\"");
@@ -3093,7 +3093,7 @@
@Test
public void testUnknownStringEscapes() throws Exception {
- setSkylarkSemanticsOptions("--incompatible_restrict_string_escapes=false");
+ setStarlarkSemanticsOptions("--incompatible_restrict_string_escapes=false");
scratch.file("test/extension.bzl", "y = \"\\z\"");
@@ -3288,7 +3288,7 @@
@Test
public void testLegacyProvider_AddCanonicalLegacyKeyAndModernKey() throws Exception {
- setSkylarkSemanticsOptions("--incompatible_disallow_struct_provider_syntax=false");
+ setStarlarkSemanticsOptions("--incompatible_disallow_struct_provider_syntax=false");
scratch.file(
"test/skylark/extension.bzl",
"def custom_rule_impl(ctx):",
@@ -3316,7 +3316,7 @@
@Test
public void testLegacyProvider_DontAutomaticallyAddKeysAlreadyPresent() throws Exception {
- setSkylarkSemanticsOptions("--incompatible_disallow_struct_provider_syntax=false");
+ setStarlarkSemanticsOptions("--incompatible_disallow_struct_provider_syntax=false");
scratch.file(
"test/skylark/extension.bzl",
"def custom_rule_impl(ctx):",
@@ -3345,7 +3345,7 @@
@Test
public void testLegacyProvider_FirstNoncanonicalKeyBecomesCanonical() throws Exception {
- setSkylarkSemanticsOptions("--incompatible_disallow_struct_provider_syntax=false");
+ setStarlarkSemanticsOptions("--incompatible_disallow_struct_provider_syntax=false");
scratch.file(
"test/skylark/extension.bzl",
"def custom_rule_impl(ctx):",
diff --git a/src/test/java/com/google/devtools/build/lib/skylark/SkylarkRuleClassFunctionsTest.java b/src/test/java/com/google/devtools/build/lib/skylark/SkylarkRuleClassFunctionsTest.java
index d55101c..6f718ad 100644
--- a/src/test/java/com/google/devtools/build/lib/skylark/SkylarkRuleClassFunctionsTest.java
+++ b/src/test/java/com/google/devtools/build/lib/skylark/SkylarkRuleClassFunctionsTest.java
@@ -253,7 +253,7 @@
@Test
public void testDisableDeprecatedParams() throws Exception {
- setSkylarkSemanticsOptions("--incompatible_disable_deprecated_attr_params=true");
+ setStarlarkSemanticsOptions("--incompatible_disable_deprecated_attr_params=true");
// Verify 'single_file' deprecation.
EvalException expected =
@@ -597,7 +597,7 @@
@Test
public void testAttrNonEmpty() throws Exception {
- setSkylarkSemanticsOptions("--incompatible_disable_deprecated_attr_params=false");
+ setStarlarkSemanticsOptions("--incompatible_disable_deprecated_attr_params=false");
reset();
Attribute attr = buildAttribute("a1", "attr.string_list(non_empty=True)");
@@ -1784,7 +1784,7 @@
@Test
public void testRuleAddExecGroup() throws Exception {
- setSkylarkSemanticsOptions("--experimental_exec_groups=true");
+ setStarlarkSemanticsOptions("--experimental_exec_groups=true");
reset();
registerDummyStarlarkFunction();
@@ -1844,7 +1844,7 @@
@Test
public void testCreateExecGroup() throws Exception {
- setSkylarkSemanticsOptions("--experimental_exec_groups=true");
+ setStarlarkSemanticsOptions("--experimental_exec_groups=true");
reset();
scratch.file("test/BUILD", "toolchain_type(name = 'my_toolchain_type')");
diff --git a/src/test/java/com/google/devtools/build/lib/skylark/SkylarkRuleContextTest.java b/src/test/java/com/google/devtools/build/lib/skylark/SkylarkRuleContextTest.java
index e4309a2..3e80e40 100644
--- a/src/test/java/com/google/devtools/build/lib/skylark/SkylarkRuleContextTest.java
+++ b/src/test/java/com/google/devtools/build/lib/skylark/SkylarkRuleContextTest.java
@@ -223,7 +223,7 @@
@Test
public void testMandatoryProvidersListWithSkylark() throws Exception {
- setSkylarkSemanticsOptions("--incompatible_disallow_struct_provider_syntax=false");
+ setStarlarkSemanticsOptions("--incompatible_disallow_struct_provider_syntax=false");
scratch.file("test/BUILD",
"load('//test:rules.bzl', 'skylark_rule', 'my_rule', 'my_other_rule')",
"my_rule(name = 'mylib',",
@@ -264,7 +264,7 @@
@Test
public void testMandatoryProvidersListWithNative() throws Exception {
- setSkylarkSemanticsOptions("--incompatible_disallow_struct_provider_syntax=false");
+ setStarlarkSemanticsOptions("--incompatible_disallow_struct_provider_syntax=false");
scratch.file("test/BUILD",
"load('//test:rules.bzl', 'my_rule', 'my_other_rule')",
"my_rule(name = 'mylib',",
@@ -899,7 +899,7 @@
@Test
public void testDeriveArtifactLegacy() throws Exception {
- setSkylarkSemanticsOptions("--incompatible_new_actions_api=false");
+ setStarlarkSemanticsOptions("--incompatible_new_actions_api=false");
setRuleContext(createRuleContext("//foo:foo"));
Object result = eval("ruleContext.new_file(ruleContext.genfiles_dir," + " 'a/b.txt')");
PathFragment fragment = ((Artifact) result).getRootRelativePath();
@@ -947,7 +947,7 @@
@Test
public void testParamFileLegacy() throws Exception {
- setSkylarkSemanticsOptions("--incompatible_new_actions_api=false");
+ setStarlarkSemanticsOptions("--incompatible_new_actions_api=false");
setRuleContext(createRuleContext("//foo:foo"));
Object result =
eval(
@@ -958,7 +958,7 @@
@Test
public void testParamFileSuffixLegacy() throws Exception {
- setSkylarkSemanticsOptions("--incompatible_new_actions_api=false");
+ setStarlarkSemanticsOptions("--incompatible_new_actions_api=false");
setRuleContext(createRuleContext("//foo:foo"));
Object result =
eval(
@@ -1173,7 +1173,7 @@
@Test
public void testLabelKeyedStringDictAllowsRulesWithRequiredProviders_legacy() throws Exception {
- setSkylarkSemanticsOptions("--incompatible_disallow_struct_provider_syntax=false");
+ setStarlarkSemanticsOptions("--incompatible_disallow_struct_provider_syntax=false");
scratch.file(
"my_rule.bzl",
"def _impl(ctx):",
@@ -1594,7 +1594,7 @@
@Test
public void testAccessingRunfilesSymlinks_legacy() throws Exception {
- setSkylarkSemanticsOptions("--incompatible_disallow_struct_provider_syntax=false");
+ setStarlarkSemanticsOptions("--incompatible_disallow_struct_provider_syntax=false");
scratch.file("test/a.py");
scratch.file("test/b.py");
scratch.file(
@@ -1687,7 +1687,7 @@
@Test
public void testAccessingRunfilesRootSymlinks_legacy() throws Exception {
- setSkylarkSemanticsOptions("--incompatible_disallow_struct_provider_syntax=false");
+ setStarlarkSemanticsOptions("--incompatible_disallow_struct_provider_syntax=false");
scratch.file("test/a.py");
scratch.file("test/b.py");
scratch.file(
@@ -1905,7 +1905,7 @@
@Test
public void testAbstractActionInterface() throws Exception {
- setSkylarkSemanticsOptions(
+ setStarlarkSemanticsOptions(
"--incompatible_disallow_struct_provider_syntax=false",
"--incompatible_no_rule_outputs_param=false");
scratch.file("test/rules.bzl",
@@ -1950,7 +1950,7 @@
@Test
public void testCreatedActions() throws Exception {
- setSkylarkSemanticsOptions(
+ setStarlarkSemanticsOptions(
"--incompatible_disallow_struct_provider_syntax=false",
"--incompatible_no_rule_outputs_param=false");
// createRuleContext() gives us the context for a rule upon entry into its analysis function.
@@ -2036,7 +2036,7 @@
@Test
public void testRunShellUsesHelperScriptForLongCommand() throws Exception {
- setSkylarkSemanticsOptions(
+ setStarlarkSemanticsOptions(
"--incompatible_disallow_struct_provider_syntax=false",
"--incompatible_no_rule_outputs_param=false");
// createRuleContext() gives us the context for a rule upon entry into its analysis function.
@@ -2386,7 +2386,7 @@
@Test
public void testFrozenRuleContextHasInaccessibleAttributes() throws Exception {
- setSkylarkSemanticsOptions("--incompatible_new_actions_api=false");
+ setStarlarkSemanticsOptions("--incompatible_new_actions_api=false");
scratch.file("test/BUILD",
"load('//test:rules.bzl', 'main_rule', 'dep_rule')",
"dep_rule(name = 'dep')",
@@ -2429,7 +2429,7 @@
@Test
public void testFrozenRuleContextForAspectsHasInaccessibleAttributes() throws Exception {
- setSkylarkSemanticsOptions("--incompatible_new_actions_api=false");
+ setStarlarkSemanticsOptions("--incompatible_new_actions_api=false");
List<String> attributes = new ArrayList<>();
attributes.addAll(ctxAttributes);
attributes.addAll(ImmutableList.of(
@@ -2508,7 +2508,7 @@
" outputs = {'file': 'output.txt'},",
")"
);
- setSkylarkSemanticsOptions("--incompatible_new_actions_api=true");
+ setStarlarkSemanticsOptions("--incompatible_new_actions_api=true");
invalidatePackages();
AssertionError e =
assertThrows(
@@ -2544,7 +2544,7 @@
}
private void writeIntFlagBuildSettingFiles() throws Exception {
- setSkylarkSemanticsOptions("--experimental_build_setting_api=True");
+ setStarlarkSemanticsOptions("--experimental_build_setting_api=True");
scratch.file(
"test/build_setting.bzl",
"BuildSettingInfo = provider(fields = ['name', 'value'])",
@@ -2592,7 +2592,7 @@
@Test
public void testBuildSettingValue_nonBuildSettingRule() throws Exception {
- setSkylarkSemanticsOptions("--experimental_build_setting_api=True");
+ setStarlarkSemanticsOptions("--experimental_build_setting_api=True");
scratch.file(
"test/rule.bzl",
"def _impl(ctx):",
@@ -2792,7 +2792,7 @@
"something/BUILD",
"load('//something:defs.bzl', 'use_exec_groups')",
"use_exec_groups(name = 'nectarine')");
- setSkylarkSemanticsOptions("--experimental_exec_groups=true");
+ setStarlarkSemanticsOptions("--experimental_exec_groups=true");
useConfiguration(
"--extra_toolchains=//toolchain:foo_toolchain,//toolchain:bar_toolchain",
"--platforms=//platform:platform_1");
diff --git a/src/test/java/com/google/devtools/build/lib/skylark/SkylarkRuleImplementationFunctionsTest.java b/src/test/java/com/google/devtools/build/lib/skylark/SkylarkRuleImplementationFunctionsTest.java
index 7ceeb9b..7cac83f 100644
--- a/src/test/java/com/google/devtools/build/lib/skylark/SkylarkRuleImplementationFunctionsTest.java
+++ b/src/test/java/com/google/devtools/build/lib/skylark/SkylarkRuleImplementationFunctionsTest.java
@@ -448,7 +448,7 @@
@Test
public void testCreateSpawnActionWithToolInInputsLegacy() throws Exception {
- setSkylarkSemanticsOptions("--incompatible_no_support_tools_in_action_inputs=false");
+ setStarlarkSemanticsOptions("--incompatible_no_support_tools_in_action_inputs=false");
setupToolInInputsTest(
"output = ctx.actions.declare_file('bar.out')",
"ctx.actions.run_shell(",
@@ -463,7 +463,7 @@
@Test
public void testCreateSpawnActionWithToolAttribute() throws Exception {
- setSkylarkSemanticsOptions("--incompatible_no_support_tools_in_action_inputs=true");
+ setStarlarkSemanticsOptions("--incompatible_no_support_tools_in_action_inputs=true");
setupToolInInputsTest(
"output = ctx.actions.declare_file('bar.out')",
"ctx.actions.run_shell(",
@@ -479,7 +479,7 @@
@Test
public void testCreateSpawnActionWithToolAttributeIgnoresToolsInInputs() throws Exception {
- setSkylarkSemanticsOptions("--incompatible_no_support_tools_in_action_inputs=true");
+ setStarlarkSemanticsOptions("--incompatible_no_support_tools_in_action_inputs=true");
setupToolInInputsTest(
"output = ctx.actions.declare_file('bar.out')",
"ctx.actions.run_shell(",
@@ -495,7 +495,7 @@
@Test
public void testCreateSpawnActionWithToolInInputsFailAtAnalysisTime() throws Exception {
- setSkylarkSemanticsOptions("--incompatible_no_support_tools_in_action_inputs=true");
+ setStarlarkSemanticsOptions("--incompatible_no_support_tools_in_action_inputs=true");
setupToolInInputsTest(
"output = ctx.actions.declare_file('bar.out')",
"ctx.actions.run_shell(",
@@ -1150,7 +1150,7 @@
@Test
public void testDefaultProviderInvalidConfiguration() throws Exception {
- setSkylarkSemanticsOptions("--incompatible_disallow_struct_provider_syntax=false");
+ setStarlarkSemanticsOptions("--incompatible_disallow_struct_provider_syntax=false");
scratch.file(
"test/foo.bzl",
"foo_provider = provider()",
@@ -2547,7 +2547,7 @@
scratch.file("test/BUILD", "load('//test:rule.bzl', 'foo')", "foo(name='foo')");
- setSkylarkSemanticsOptions("--experimental_starlark_config_transitions=true");
+ setStarlarkSemanticsOptions("--experimental_starlark_config_transitions=true");
reporter.removeHandler(failFastHandler);
getConfiguredTarget("//test:foo");
@@ -2588,7 +2588,7 @@
" '_attr': attr.label(",
" cfg = android_common.multi_cpu_configuration,",
" default = configuration_field(fragment='cpp', name = 'cc_toolchain'))})");
- setSkylarkSemanticsOptions("--experimental_google_legacy_api");
+ setStarlarkSemanticsOptions("--experimental_google_legacy_api");
scratch.file("test/BUILD", "load('//test:rule.bzl', 'foo')", "foo(name='foo')");
diff --git a/src/test/java/com/google/devtools/build/lib/skylark/StarlarkOptionsParsingTest.java b/src/test/java/com/google/devtools/build/lib/skylark/StarlarkOptionsParsingTest.java
index 3e7bc96..4785d7f 100644
--- a/src/test/java/com/google/devtools/build/lib/skylark/StarlarkOptionsParsingTest.java
+++ b/src/test/java/com/google/devtools/build/lib/skylark/StarlarkOptionsParsingTest.java
@@ -120,7 +120,7 @@
// test --non_flag_setting=value
@Test
public void testNonFlagParsing() throws Exception {
- setSkylarkSemanticsOptions("--experimental_build_setting_api=True");
+ setStarlarkSemanticsOptions("--experimental_build_setting_api=True");
scratch.file(
"test/build_setting.bzl",
@@ -209,7 +209,7 @@
// test --flagA=valueA --flagB=valueB
@Test
public void testMultipleFlags() throws Exception {
- setSkylarkSemanticsOptions("--experimental_build_setting_api=True");
+ setStarlarkSemanticsOptions("--experimental_build_setting_api=True");
scratch.file(
"test/build_setting.bzl",
diff --git a/src/test/java/com/google/devtools/build/lib/skylark/util/SkylarkTestCase.java b/src/test/java/com/google/devtools/build/lib/skylark/util/SkylarkTestCase.java
index 1619f0d..c46c706 100644
--- a/src/test/java/com/google/devtools/build/lib/skylark/util/SkylarkTestCase.java
+++ b/src/test/java/com/google/devtools/build/lib/skylark/util/SkylarkTestCase.java
@@ -60,7 +60,7 @@
Mutability mu = Mutability.create("test");
StarlarkThread thread =
StarlarkThread.builder(mu)
- .setSemantics(getSkylarkSemantics())
+ .setSemantics(getStarlarkSemantics())
.setGlobals(
globals.withLabel(
Label.parseAbsoluteUnchecked("//test:label", /*defaultToMain=*/ false)))
@@ -107,8 +107,8 @@
}
protected final SkylarkRuleContext createRuleContext(String label) throws Exception {
- return new SkylarkRuleContext(getRuleContextForSkylark(getConfiguredTarget(label)), null,
- getSkylarkSemantics());
+ return new SkylarkRuleContext(
+ getRuleContextForStarlark(getConfiguredTarget(label)), null, getStarlarkSemantics());
}
// Disable BuildViewTestCase's overload to avoid unintended calls.
diff --git a/src/test/java/com/google/devtools/build/lib/skylark/util/StarlarkOptionsTestCase.java b/src/test/java/com/google/devtools/build/lib/skylark/util/StarlarkOptionsTestCase.java
index c7956ac..5d29c6a 100644
--- a/src/test/java/com/google/devtools/build/lib/skylark/util/StarlarkOptionsTestCase.java
+++ b/src/test/java/com/google/devtools/build/lib/skylark/util/StarlarkOptionsTestCase.java
@@ -68,7 +68,7 @@
private void writeBuildSetting(String type, String defaultValue, boolean isFlag)
throws Exception {
- setSkylarkSemanticsOptions("--experimental_build_setting_api=True");
+ setStarlarkSemanticsOptions("--experimental_build_setting_api=True");
String flag = isFlag ? "True" : "False";