Skip to content

Commit

Permalink
Flip --incompatible_disallow_ctx_resolve_tools.
Browse files Browse the repository at this point in the history
Fixes #22249.

RELNOTES[INC]: `ctx.resolve_tools` is no longer available by default, in preparation for complete removal. See #22249 for migration instructions. Use `--noincompatible_disallow_ctx_resolve_tools` to temporarily make it available again.

PiperOrigin-RevId: 668521211
Change-Id: I9d0119796a8971dc724e7955d15fc03559e941bb
  • Loading branch information
tjgq authored and copybara-github committed Aug 28, 2024
1 parent f1ceed2 commit d11e0c2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Expand Down Expand Up @@ -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<String> EXPERIMENTAL_BUILTINS_BZL_PATH =
new StarlarkSemantics.Key<>("experimental_builtins_bzl_path", "%bundled%");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit d11e0c2

Please sign in to comment.