diff --git a/src/main/java/com/google/devtools/build/lib/packages/semantics/BuildLanguageOptions.java b/src/main/java/com/google/devtools/build/lib/packages/semantics/BuildLanguageOptions.java index 9c518ed3d7ec3c..0b55cce67bffab 100644 --- a/src/main/java/com/google/devtools/build/lib/packages/semantics/BuildLanguageOptions.java +++ b/src/main/java/com/google/devtools/build/lib/packages/semantics/BuildLanguageOptions.java @@ -763,7 +763,7 @@ public final class BuildLanguageOptions extends OptionsBase { @Option( name = "incompatible_disallow_ctx_resolve_tools", - defaultValue = "false", + defaultValue = "true", documentationCategory = OptionDocumentationCategory.STARLARK_SEMANTICS, effectTags = {OptionEffectTag.LOADING_AND_ANALYSIS}, metadataTags = {OptionMetadataTag.INCOMPATIBLE_CHANGE}, @@ -980,7 +980,7 @@ public StarlarkSemantics toStarlarkSemantics() { public static final String INCOMPATIBLE_STOP_EXPORTING_BUILD_FILE_PATH = "-incompatible_stop_exporting_build_file_path"; public static final String INCOMPATIBLE_DISALLOW_CTX_RESOLVE_TOOLS = - "-incompatible_disallow_ctx_resolve_tools"; + "+incompatible_disallow_ctx_resolve_tools"; // non-booleans public static final StarlarkSemantics.Key EXPERIMENTAL_BUILTINS_BZL_PATH = new StarlarkSemantics.Key<>("experimental_builtins_bzl_path", "%bundled%"); diff --git a/src/test/java/com/google/devtools/build/lib/starlark/StarlarkRuleImplementationFunctionsTest.java b/src/test/java/com/google/devtools/build/lib/starlark/StarlarkRuleImplementationFunctionsTest.java index 0fb4208128f301..d9084b4e4227ee 100644 --- a/src/test/java/com/google/devtools/build/lib/starlark/StarlarkRuleImplementationFunctionsTest.java +++ b/src/test/java/com/google/devtools/build/lib/starlark/StarlarkRuleImplementationFunctionsTest.java @@ -854,6 +854,7 @@ public void resolveCommandScript_namingNotDependantOnCommand() throws Exception @Test public void testResolveTools() throws Exception { + setBuildLanguageOptions("--incompatible_disallow_ctx_resolve_tools=false"); StarlarkRuleContext ruleContext = createRuleContext("//foo:resolve_me"); setRuleContext(ruleContext); ev.exec(