From 684646e31d4dbb9338814fb07cf3bb753d1eac36 Mon Sep 17 00:00:00 2001 From: laurentlb Date: Fri, 22 Mar 2019 08:24:33 -0700 Subject: [PATCH] Automated rollback of commit 15b70bb63e5495290900de9303cbebb0ff12210b. *** Reason for rollback *** Roll forward *** Original change description *** 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: 239798602 --- 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, 3 insertions(+), 5 deletions(-) diff --git a/site/docs/skylark/backward-compatibility.md b/site/docs/skylark/backward-compatibility.md index 8040418b679562..4a714701c8a58d 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: `false` +* Default: `true` * 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 959184feb560c0..f8e6a94d5d6b6c 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 = "false", + defaultValue = "true", 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 c32e91521df2d5..748523314080ff 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(false) + .incompatibleNoTransitiveLoads(true) .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 c05b61549253b1..5dad405f793e2c 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,7 +477,5 @@ 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); } }