diff --git a/src/main/java/com/google/devtools/build/lib/analysis/RuleContext.java b/src/main/java/com/google/devtools/build/lib/analysis/RuleContext.java index db14b6997b8a68..b2ac371ea997f5 100644 --- a/src/main/java/com/google/devtools/build/lib/analysis/RuleContext.java +++ b/src/main/java/com/google/devtools/build/lib/analysis/RuleContext.java @@ -235,7 +235,7 @@ private FeatureSet computeFeatures() { public boolean isAllowTagsPropagation() { return getAnalysisEnvironment() .getStarlarkSemantics() - .getBool(BuildLanguageOptions.EXPERIMENTAL_ALLOW_TAGS_PROPAGATION); + .getBool(BuildLanguageOptions.INCOMPATIBLE_ALLOW_TAGS_PROPAGATION); } public RepositoryName getRepository() { diff --git a/src/main/java/com/google/devtools/build/lib/analysis/starlark/StarlarkActionFactory.java b/src/main/java/com/google/devtools/build/lib/analysis/starlark/StarlarkActionFactory.java index bfa02213d317d8..4443ad35fa358a 100644 --- a/src/main/java/com/google/devtools/build/lib/analysis/starlark/StarlarkActionFactory.java +++ b/src/main/java/com/google/devtools/build/lib/analysis/starlark/StarlarkActionFactory.java @@ -778,7 +778,7 @@ private void registerStarlarkAction( TargetUtils.getFilteredExecutionInfo( executionRequirementsUnchecked, ruleContext.getRule(), - getSemantics().getBool(BuildLanguageOptions.EXPERIMENTAL_ALLOW_TAGS_PROPAGATION)); + getSemantics().getBool(BuildLanguageOptions.INCOMPATIBLE_ALLOW_TAGS_PROPAGATION)); builder.setExecutionInfo(executionInfo); if (inputManifestsUnchecked != Starlark.NONE) { 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 2641aa3fdee03c..a081328dd6dbe9 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 @@ -329,9 +329,9 @@ public final class BuildLanguageOptions extends OptionsBase { public boolean experimentalSiblingRepositoryLayout; @Option( - name = "experimental_allow_tags_propagation", - oldName = "incompatible_allow_tags_propagation", - defaultValue = "false", + name = "incompatible_allow_tags_propagation", + oldName = "experimental_allow_tags_propagation", + defaultValue = "true", documentationCategory = OptionDocumentationCategory.STARLARK_SEMANTICS, effectTags = {OptionEffectTag.BUILD_FILE_SEMANTICS}, metadataTags = { @@ -678,7 +678,7 @@ public StarlarkSemantics toStarlarkSemantics() { .setBool(INCOMPATIBLE_REMOVE_RULE_NAME_PARAMETER, incompatibleRemoveRuleNameParameter) .setBool( INCOMPATIBLE_DISALLOW_SYMLINK_FILE_TO_DIR, incompatibleDisallowSymlinkFileToDir) - .setBool(EXPERIMENTAL_ALLOW_TAGS_PROPAGATION, experimentalAllowTagsPropagation) + .setBool(INCOMPATIBLE_ALLOW_TAGS_PROPAGATION, experimentalAllowTagsPropagation) .set(EXPERIMENTAL_BUILTINS_BZL_PATH, experimentalBuiltinsBzlPath) .setBool(EXPERIMENTAL_BUILTINS_DUMMY, experimentalBuiltinsDummy) .set(EXPERIMENTAL_BUILTINS_INJECTION_OVERRIDE, experimentalBuiltinsInjectionOverride) @@ -770,8 +770,8 @@ public StarlarkSemantics toStarlarkSemantics() { "+incompatible_remove_rule_name_parameter"; public static final String INCOMPATIBLE_DISALLOW_SYMLINK_FILE_TO_DIR = "+incompatible_disallow_symlink_file_to_dir"; - public static final String EXPERIMENTAL_ALLOW_TAGS_PROPAGATION = - "-experimental_allow_tags_propagation"; + public static final String INCOMPATIBLE_ALLOW_TAGS_PROPAGATION = + "+incompatible_allow_tags_propagation"; public static final String EXPERIMENTAL_BUILTINS_DUMMY = "-experimental_builtins_dummy"; public static final String EXPERIMENTAL_BZL_VISIBILITY = "+experimental_bzl_visibility"; public static final String CHECK_BZL_VISIBILITY = "+check_bzl_visibility"; @@ -795,8 +795,6 @@ public StarlarkSemantics toStarlarkSemantics() { public static final String EXPERIMENTAL_LAZY_TEMPLATE_EXPANSION = "+experimental_lazy_template_expansion"; public static final String EXPERIMENTAL_ANALYSIS_TEST_CALL = "+experimental_analysis_test_call"; - public static final String INCOMPATIBLE_ALLOW_TAGS_PROPAGATION = - "-incompatible_allow_tags_propagation"; public static final String INCOMPATIBLE_ALWAYS_CHECK_DEPSET_ELEMENTS = "+incompatible_always_check_depset_elements"; public static final String INCOMPATIBLE_DEPSET_FOR_LIBRARIES_TO_LINK_GETTER = diff --git a/src/test/java/com/google/devtools/build/lib/packages/semantics/ConsistencyTest.java b/src/test/java/com/google/devtools/build/lib/packages/semantics/ConsistencyTest.java index 4cf733d5057d12..214a8eeabf69cf 100644 --- a/src/test/java/com/google/devtools/build/lib/packages/semantics/ConsistencyTest.java +++ b/src/test/java/com/google/devtools/build/lib/packages/semantics/ConsistencyTest.java @@ -172,7 +172,7 @@ private static StarlarkSemantics buildRandomSemantics(Random rand) { .setBool(BuildLanguageOptions.ENABLE_BZLMOD, rand.nextBoolean()) .setBool(BuildLanguageOptions.EXPERIMENTAL_GOOGLE_LEGACY_API, rand.nextBoolean()) .setBool(BuildLanguageOptions.EXPERIMENTAL_PLATFORMS_API, rand.nextBoolean()) - .setBool(BuildLanguageOptions.EXPERIMENTAL_ALLOW_TAGS_PROPAGATION, rand.nextBoolean()) + .setBool(BuildLanguageOptions.INCOMPATIBLE_ALLOW_TAGS_PROPAGATION, rand.nextBoolean()) .setBool(BuildLanguageOptions.EXPERIMENTAL_CC_SHARED_LIBRARY, rand.nextBoolean()) .setBool(BuildLanguageOptions.EXPERIMENTAL_REPO_REMOTE_EXEC, rand.nextBoolean()) .setBool(BuildLanguageOptions.EXPERIMENTAL_ACTION_RESOURCE_SET, rand.nextBoolean())