Skip to content

Commit

Permalink
Flip --incompatible_no_implicit_watch_label
Browse files Browse the repository at this point in the history
Fixes #23861

RELNOTES[inc]: `repository_ctx.path()` and `module_ctx.path()` no longer watch arguments of type `Label`. Use the `watch()` method or the `watch` parameter on other methods on these context objects instead. See #23861 for details.

Closes #23872.

PiperOrigin-RevId: 682413794
Change-Id: I22c9dd06b5c0f6c78302a28b52ca1f3e9a23507a
  • Loading branch information
fmeum authored and copybara-github committed Oct 4, 2024
1 parent 48c8d9c commit 527ab48
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ public final class BuildLanguageOptions extends OptionsBase {

@Option(
name = "incompatible_no_implicit_watch_label",
defaultValue = "false",
defaultValue = "true",
documentationCategory = OptionDocumentationCategory.STARLARK_SEMANTICS,
metadataTags = OptionMetadataTag.INCOMPATIBLE_CHANGE,
effectTags = OptionEffectTag.LOADING_AND_ANALYSIS,
Expand Down Expand Up @@ -963,7 +963,7 @@ public StarlarkSemantics toStarlarkSemantics() {
public static final String EXPERIMENTAL_ISOLATED_EXTENSION_USAGES =
"-experimental_isolated_extension_usages";
public static final String INCOMPATIBLE_NO_IMPLICIT_WATCH_LABEL =
"-incompatible_no_implicit_watch_label";
"+incompatible_no_implicit_watch_label";
public static final String EXPERIMENTAL_GOOGLE_LEGACY_API = "-experimental_google_legacy_api";
public static final String EXPERIMENTAL_PLATFORMS_API = "-experimental_platforms_api";
public static final String EXPERIMENTAL_REPO_REMOTE_EXEC = "-experimental_repo_remote_exec";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,11 @@ public void testWorkspaceRoot() throws Exception {

@Test
public void testNoIncompatibleNoImplicitWatchLabel() throws Exception {
setUpContextForRule("test");
setUpContextForRule(
"test",
StarlarkSemantics.DEFAULT.toBuilder()
.setBool(BuildLanguageOptions.INCOMPATIBLE_NO_IMPLICIT_WATCH_LABEL, false)
.build());
scratch.file(root.getRelative("foo").getPathString());
StarlarkPath unusedPath = context.getPath(fakeFileLabel);
String unusedRead = context.readFile(fakeFileLabel, "no", thread);
Expand Down

0 comments on commit 527ab48

Please sign in to comment.