From b4292d2ee1154c15d1f099b3e8941c3c448725ba Mon Sep 17 00:00:00 2001 From: Googler Date: Sat, 21 Oct 2023 03:58:27 -0700 Subject: [PATCH] Flip --incompatible_disable_objc_library_transition Downstream tests: https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/3393 RELNOTES[INC]: transition is removed from objc_library (https://github.com/bazelbuild/bazel/issues/19688) PiperOrigin-RevId: 575438171 Change-Id: I2deed40dbb289255623d8c8281157ea3326901a2 --- .../build/lib/packages/semantics/BuildLanguageOptions.java | 4 ++-- .../devtools/build/lib/rules/objc/ObjcRuleTestCase.java | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) 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 20df31e07d9fe0..95dbed2aff7a4e 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 @@ -651,7 +651,7 @@ public final class BuildLanguageOptions extends OptionsBase { @Option( name = "incompatible_disable_objc_library_transition", - defaultValue = "false", + defaultValue = "true", documentationCategory = OptionDocumentationCategory.STARLARK_SEMANTICS, effectTags = {OptionEffectTag.BUILD_FILE_SEMANTICS}, metadataTags = {OptionMetadataTag.INCOMPATIBLE_CHANGE}, @@ -889,7 +889,7 @@ public StarlarkSemantics toStarlarkSemantics() { public static final String INCOMPATIBLE_OBJC_PROVIDER_REMOVE_LINKING_INFO = "-incompatible_objc_provider_remove_linking_info"; public static final String INCOMPATIBLE_DISABLE_OBJC_LIBRARY_TRANSITION = - "-incompatible_disable_objc_library_transition"; + "+incompatible_disable_objc_library_transition"; public static final String INCOMPATIBLE_FAIL_ON_UNKNOWN_ATTRIBUTES = "+incompatible_fail_on_unknown_attributes"; public static final String INCOMPATIBLE_ENABLE_PROTO_TOOLCHAIN_RESOLUTION = diff --git a/src/test/java/com/google/devtools/build/lib/rules/objc/ObjcRuleTestCase.java b/src/test/java/com/google/devtools/build/lib/rules/objc/ObjcRuleTestCase.java index 7c65ab0cecf3d9..a1466b420128df 100644 --- a/src/test/java/com/google/devtools/build/lib/rules/objc/ObjcRuleTestCase.java +++ b/src/test/java/com/google/devtools/build/lib/rules/objc/ObjcRuleTestCase.java @@ -69,6 +69,7 @@ import java.util.Map; import java.util.regex.Pattern; import javax.annotation.Nullable; +import org.junit.Before; /** * Superclass for all Obj-C rule tests. @@ -89,6 +90,11 @@ public abstract class ObjcRuleTestCase extends BuildViewTestCase { protected static final String OUTPUTDIR = TestConstants.PRODUCT_NAME + "-out//bin"; + @Before + public void setUp() throws Exception { + setBuildLanguageOptions("--noincompatible_disable_objc_library_transition"); + } + /** Specification of code coverage behavior. */ public enum CodeCoverageMode { // No code coverage information.