From 06352cb0a4d21df26d975ca595f2c7a7a6df9137 Mon Sep 17 00:00:00 2001 From: Keith Smiley Date: Fri, 10 Nov 2023 06:06:10 -0800 Subject: [PATCH] [7.0.0] Flip --incompatible_disable_objc_library_transition (#20082) RELNOTES[INC]: transition is removed from objc_library (https://github.com/bazelbuild/bazel/issues/19688) (cherry picked from commit b4292d2ee1154c15d1f099b3e8941c3c448725ba) Co-authored-by: Googler --- .../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 8f3d8d738a2b0b..128aa1bfbb7e16 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}, @@ -879,7 +879,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.