From 81757105aea50a5a34c25003aa5d28d6bb0013ee Mon Sep 17 00:00:00 2001 From: Googler Date: Thu, 2 Mar 2023 02:49:27 -0800 Subject: [PATCH] Roll forward of https://github.com/bazelbuild/bazel/commit/7bd0ab63a8441c3f3d7f495d09ed2bed38762874: Default --incompatible_strict_conflict_checks to true. NEW: The flag has been moved from AnalysisOptions to CoreOptions. The invalidation behavior for the flag was fixed in https://github.com/bazelbuild/bazel/commit/cb8db3b15d679b89b73c1a55aa44e2107fd5917c. The incompatible flags pipeline reports no broken downstream projects. I've manually validated downstream projects that are already failing without the incompatible flags. *** Original change description *** Automated rollback of commit 7bd0ab63a8441c3f3d7f495d09ed2bed38762874. *** Reason for rollback *** Breaks rules_apple. The incompatible flags pipeline incorrectly reported the change as safe because setting the flag doesn't invalidate the build (so we got cached results from building without the flag). *** Original change description *** Default --incompatible_strict_conflict_checks to true. The downstream pipeline indicates that this is safe to flip: https://buildkite.com/bazel/bazelisk-plus-incompatible-flags/builds/1346 Fixes #16729. RELNOTES[INC]: `--incompatible_strict_conflict_checks` is flipped to true. See https://github.com/bazelbuild/bazel/issues/16729 for details. PiperOrigin-RevId: 513484241 Change-Id: If407ff1164571492021a1c23168f6dfc66bc01d1 --- .../devtools/build/lib/analysis/config/CoreOptions.java | 2 +- .../build/lib/remote/BuildWithoutTheBytesIntegrationTest.java | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/google/devtools/build/lib/analysis/config/CoreOptions.java b/src/main/java/com/google/devtools/build/lib/analysis/config/CoreOptions.java index b13e004646ff53..dcf0966c2b9106 100644 --- a/src/main/java/com/google/devtools/build/lib/analysis/config/CoreOptions.java +++ b/src/main/java/com/google/devtools/build/lib/analysis/config/CoreOptions.java @@ -176,7 +176,7 @@ public class CoreOptions extends FragmentOptions implements Cloneable { @Option( name = "incompatible_strict_conflict_checks", oldName = "experimental_strict_conflict_checks", - defaultValue = "false", + defaultValue = "true", documentationCategory = OptionDocumentationCategory.UNDOCUMENTED, metadataTags = OptionMetadataTag.INCOMPATIBLE_CHANGE, effectTags = {OptionEffectTag.BAZEL_INTERNAL_CONFIGURATION}, diff --git a/src/test/java/com/google/devtools/build/lib/remote/BuildWithoutTheBytesIntegrationTest.java b/src/test/java/com/google/devtools/build/lib/remote/BuildWithoutTheBytesIntegrationTest.java index 05c582fab1468d..2870c873293649 100644 --- a/src/test/java/com/google/devtools/build/lib/remote/BuildWithoutTheBytesIntegrationTest.java +++ b/src/test/java/com/google/devtools/build/lib/remote/BuildWithoutTheBytesIntegrationTest.java @@ -321,6 +321,8 @@ public void symlinkToDirectory() throws Exception { @Test public void symlinkToNestedFile() throws Exception { + addOptions("--noincompatible_strict_conflict_checks"); + write( "a/defs.bzl", "def _impl(ctx):", @@ -373,6 +375,8 @@ public void symlinkToNestedFile() throws Exception { @Test public void symlinkToNestedDirectory() throws Exception { + addOptions("--noincompatible_strict_conflict_checks"); + write( "a/defs.bzl", "def _impl(ctx):",