From 15b70bb63e5495290900de9303cbebb0ff12210b Mon Sep 17 00:00:00 2001 From: laurentlb Date: Wed, 20 Mar 2019 15:18:18 -0700 Subject: [PATCH] Automated rollback of commit f7f5415af74bda139d7e24bc3e0db1b9b470e7e5. *** Reason for rollback *** Breaks things inside Google. I'll roll it forward in a few days. *** Original change description *** Enable --incompatible_no_transitive_loads by default Fixes https://github.com/bazelbuild/bazel/issues/5636 Tested: https://buildkite.com/bazel/bazelisk-plus-incompatible-flags/builds/48 RELNOTES: --incompatible_no_transitive_loads is enabled by default. PiperOrigin-RevId: 239485725 --- site/docs/skylark/backward-compatibility.md | 2 +- .../devtools/build/lib/packages/StarlarkSemanticsOptions.java | 2 +- .../com/google/devtools/build/lib/syntax/StarlarkSemantics.java | 2 +- .../build/lib/skyframe/SkylarkImportLookupFunctionTest.java | 2 ++ 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/site/docs/skylark/backward-compatibility.md b/site/docs/skylark/backward-compatibility.md index 4a714701c8a58d..8040418b679562 100644 --- a/site/docs/skylark/backward-compatibility.md +++ b/site/docs/skylark/backward-compatibility.md @@ -574,7 +574,7 @@ y = 1 ``` * Flag: `--incompatible_no_transitive_loads` -* Default: `true` +* Default: `false` * Introduced in: `0.19.0` * Tracking issue: [#5636](https://github.com/bazelbuild/bazel/issues/5636) diff --git a/src/main/java/com/google/devtools/build/lib/packages/StarlarkSemanticsOptions.java b/src/main/java/com/google/devtools/build/lib/packages/StarlarkSemanticsOptions.java index f8e6a94d5d6b6c..959184feb560c0 100644 --- a/src/main/java/com/google/devtools/build/lib/packages/StarlarkSemanticsOptions.java +++ b/src/main/java/com/google/devtools/build/lib/packages/StarlarkSemanticsOptions.java @@ -464,7 +464,7 @@ public class StarlarkSemanticsOptions extends OptionsBase implements Serializabl @Option( name = "incompatible_no_transitive_loads", - defaultValue = "true", + defaultValue = "false", documentationCategory = OptionDocumentationCategory.STARLARK_SEMANTICS, effectTags = {OptionEffectTag.BUILD_FILE_SEMANTICS}, metadataTags = { diff --git a/src/main/java/com/google/devtools/build/lib/syntax/StarlarkSemantics.java b/src/main/java/com/google/devtools/build/lib/syntax/StarlarkSemantics.java index 748523314080ff..c32e91521df2d5 100644 --- a/src/main/java/com/google/devtools/build/lib/syntax/StarlarkSemantics.java +++ b/src/main/java/com/google/devtools/build/lib/syntax/StarlarkSemantics.java @@ -233,7 +233,7 @@ public static Builder builderWithDefaults() { .incompatibleNoOutputAttrDefault(false) .incompatibleNoSupportToolsInActionInputs(false) .incompatibleNoTargetOutputGroup(false) - .incompatibleNoTransitiveLoads(true) + .incompatibleNoTransitiveLoads(false) .incompatibleRemapMainRepo(false) .incompatibleRemoveNativeMavenJar(false) .incompatibleRequireFeatureConfigurationForPic(true) diff --git a/src/test/java/com/google/devtools/build/lib/skyframe/SkylarkImportLookupFunctionTest.java b/src/test/java/com/google/devtools/build/lib/skyframe/SkylarkImportLookupFunctionTest.java index 5dad405f793e2c..c05b61549253b1 100644 --- a/src/test/java/com/google/devtools/build/lib/skyframe/SkylarkImportLookupFunctionTest.java +++ b/src/test/java/com/google/devtools/build/lib/skyframe/SkylarkImportLookupFunctionTest.java @@ -477,5 +477,7 @@ public void testLoadBzlFileFromWorkspaceWithRemapping() throws Exception { assertThat(result.get(skylarkImportLookupKey).getEnvironmentExtension().getBindings()) .containsEntry("a_symbol", 5); + assertThat(result.get(skylarkImportLookupKey).getEnvironmentExtension().getBindings()) + .containsEntry("y_symbol", 5); } }