Create --incompatible_remap_main_repo flag.
This flag fixes a bug in bazel where within a repository called "foo", the labels @foo//some/path:bar.bzl and //some/path:bar.bzl were treated as different labels. It is unlikely that this flag will affect any projects but it is technically a breaking change and so it is guarded behind a flag.
Towards #7130
RELNOTES: None
PiperOrigin-RevId: 229813128
diff --git a/src/main/java/com/google/devtools/build/lib/syntax/SkylarkSemantics.java b/src/main/java/com/google/devtools/build/lib/syntax/SkylarkSemantics.java
index 1c4cb65..4cb4ef9 100644
--- a/src/main/java/com/google/devtools/build/lib/syntax/SkylarkSemantics.java
+++ b/src/main/java/com/google/devtools/build/lib/syntax/SkylarkSemantics.java
@@ -126,8 +126,6 @@
public abstract ImmutableList<String> experimentalJavaCommonCreateProviderEnabledPackages();
- public abstract boolean experimentalRemapMainRepo();
-
public abstract boolean experimentalPlatformsApi();
public abstract boolean experimentalStarlarkConfigTransitions();
@@ -174,6 +172,8 @@
public abstract boolean incompatibleNoTransitiveLoads();
+ public abstract boolean incompatibleRemapMainRepo();
+
public abstract boolean incompatibleRemoveNativeMavenJar();
public abstract boolean incompatibleRequireFeatureConfigurationForPic();
@@ -204,7 +204,6 @@
.experimentalEnableAndroidMigrationApis(false)
.experimentalEnableRepoMapping(false)
.experimentalJavaCommonCreateProviderEnabledPackages(ImmutableList.of())
- .experimentalRemapMainRepo(false)
.experimentalPlatformsApi(false)
.experimentalStarlarkConfigTransitions(false)
.experimentalTransitionWhitelistLocation("")
@@ -228,6 +227,7 @@
.incompatibleNoSupportToolsInActionInputs(false)
.incompatibleNoTargetOutputGroup(false)
.incompatibleNoTransitiveLoads(false)
+ .incompatibleRemapMainRepo(false)
.incompatibleRemoveNativeMavenJar(false)
.incompatibleRequireFeatureConfigurationForPic(true)
.incompatibleStricArgumentOrdering(false)
@@ -248,8 +248,6 @@
public abstract Builder experimentalEnableRepoMapping(boolean value);
- public abstract Builder experimentalRemapMainRepo(boolean value);
-
public abstract Builder experimentalJavaCommonCreateProviderEnabledPackages(List<String> value);
public abstract Builder experimentalPlatformsApi(boolean value);
@@ -300,6 +298,8 @@
public abstract Builder incompatibleNoTransitiveLoads(boolean value);
+ public abstract Builder incompatibleRemapMainRepo(boolean value);
+
public abstract Builder incompatibleRemoveNativeMavenJar(boolean value);
public abstract Builder incompatibleStricArgumentOrdering(boolean value);