Skip to content

Commit

Permalink
Flip --incompatible_require_feature_configuration_for_pic
Browse files Browse the repository at this point in the history
    Fixes bazelbuild/bazel#7007.

    RELNOTES: --incompatible_require_feature_configuration_for_pic was flipped (bazelbuild/bazel#7007).
    PiperOrigin-RevId: 229522013
  • Loading branch information
Luca Di Grazia committed Sep 4, 2022
1 parent cb64a73 commit 2dcbd36
Show file tree
Hide file tree
Showing 3 changed files with 324 additions and 186 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,8 @@ public class SkylarkSemanticsOptions extends OptionsBase implements Serializable
name = "experimental_enable_repo_mapping",
defaultValue = "false",
documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
effectTags = OptionEffectTag.NO_OP,
deprecationWarning =
"This behavior is on by default and the flag is a no-op. You can remove its usage",
help =
"This flag is a no-op. The use of the `repo_mapping` attribute in repository rules "
+ "is enabled by default.")
effectTags = OptionEffectTag.BUILD_FILE_SEMANTICS,
help = "If set to true, enables the use of the `repo_mapping` attribute in WORKSPACE files.")
public boolean experimentalEnableRepoMapping;

// This flag is declared in SkylarkSemanticsOptions instead of JavaOptions because there is no
Expand All @@ -117,6 +113,14 @@ public class SkylarkSemanticsOptions extends OptionsBase implements Serializable
help = "Passes list of packages that can use the java_common.create_provider Starlark API.")
public List<String> experimentalJavaCommonCreateProviderEnabledPackages;

@Option(
name = "experimental_remap_main_repo",
defaultValue = "false",
documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
effectTags = OptionEffectTag.LOADING_AND_ANALYSIS,
help = "If set to true, will treat references to '@<main repo name>' the same as '@'.")
public boolean experimentalRemapMainRepo;

@Option(
name = "experimental_platforms_api",
defaultValue = "false",
Expand Down Expand Up @@ -345,7 +349,7 @@ public class SkylarkSemanticsOptions extends OptionsBase implements Serializable

@Option(
name = "incompatible_expand_directories",
defaultValue = "true",
defaultValue = "false",
category = "incompatible changes",
documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
effectTags = {OptionEffectTag.UNKNOWN},
Expand Down Expand Up @@ -440,19 +444,6 @@ public class SkylarkSemanticsOptions extends OptionsBase implements Serializable
+ "symbols introduced by load are not implicitly re-exported.")
public boolean incompatibleNoTransitiveLoads;

@Option(
name = "incompatible_remap_main_repo",
defaultValue = "false",
documentationCategory = OptionDocumentationCategory.SKYLARK_SEMANTICS,
effectTags = OptionEffectTag.LOADING_AND_ANALYSIS,
metadataTags = {
OptionMetadataTag.INCOMPATIBLE_CHANGE,
OptionMetadataTag.TRIGGERED_BY_ALL_INCOMPATIBLE_CHANGES
},
oldName = "experimental_remap_main_repo",
help = "If set to true, will treat references to '@<main repo name>' the same as '@'.")
public boolean incompatibleRemapMainRepo;

@Option(
name = "incompatible_remove_native_maven_jar",
defaultValue = "false",
Expand Down Expand Up @@ -513,6 +504,7 @@ public SkylarkSemantics toSkylarkSemantics() {
.experimentalCcSkylarkApiEnabledPackages(experimentalCcSkylarkApiEnabledPackages)
.experimentalEnableAndroidMigrationApis(experimentalEnableAndroidMigrationApis)
.experimentalEnableRepoMapping(experimentalEnableRepoMapping)
.experimentalRemapMainRepo(experimentalRemapMainRepo)
.experimentalJavaCommonCreateProviderEnabledPackages(
experimentalJavaCommonCreateProviderEnabledPackages)
.experimentalPlatformsApi(experimentalPlatformsApi)
Expand All @@ -539,7 +531,6 @@ public SkylarkSemantics toSkylarkSemantics() {
.incompatibleNoSupportToolsInActionInputs(incompatibleNoSupportToolsInActionInputs)
.incompatibleNoTargetOutputGroup(incompatibleNoTargetOutputGroup)
.incompatibleNoTransitiveLoads(incompatibleNoTransitiveLoads)
.incompatibleRemapMainRepo(incompatibleRemapMainRepo)
.incompatibleRemoveNativeMavenJar(incompatibleRemoveNativeMavenJar)
.incompatibleRequireFeatureConfigurationForPic(requireFeatureConfigurationForPic)
.incompatibleStricArgumentOrdering(incompatibleStricArgumentOrdering)
Expand All @@ -548,3 +539,4 @@ public SkylarkSemantics toSkylarkSemantics() {
.build();
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ public boolean flagValue(FlagIdentifier flagIdentifier) {

public abstract ImmutableList<String> experimentalJavaCommonCreateProviderEnabledPackages();

public abstract boolean experimentalRemapMainRepo();

public abstract boolean experimentalPlatformsApi();

public abstract boolean experimentalStarlarkConfigTransitions();
Expand Down Expand Up @@ -172,8 +174,6 @@ public boolean flagValue(FlagIdentifier flagIdentifier) {

public abstract boolean incompatibleNoTransitiveLoads();

public abstract boolean incompatibleRemapMainRepo();

public abstract boolean incompatibleRemoveNativeMavenJar();

public abstract boolean incompatibleRequireFeatureConfigurationForPic();
Expand Down Expand Up @@ -204,6 +204,7 @@ public static Builder builderWithDefaults() {
.experimentalEnableAndroidMigrationApis(false)
.experimentalEnableRepoMapping(false)
.experimentalJavaCommonCreateProviderEnabledPackages(ImmutableList.of())
.experimentalRemapMainRepo(false)
.experimentalPlatformsApi(false)
.experimentalStarlarkConfigTransitions(false)
.experimentalTransitionWhitelistLocation("")
Expand All @@ -219,15 +220,14 @@ public static Builder builderWithDefaults() {
.incompatibleDisallowLegacyJavaInfo(false)
.incompatibleDisallowLoadLabelsToCrossPackageBoundaries(false)
.incompatibleDisallowOldStyleArgsAdd(false)
.incompatibleExpandDirectories(true)
.incompatibleExpandDirectories(false)
.incompatibleGenerateJavaCommonSourceJar(false)
.incompatibleNewActionsApi(false)
.incompatibleNoAttrLicense(false)
.incompatibleNoOutputAttrDefault(false)
.incompatibleNoSupportToolsInActionInputs(false)
.incompatibleNoTargetOutputGroup(false)
.incompatibleNoTransitiveLoads(false)
.incompatibleRemapMainRepo(false)
.incompatibleRemoveNativeMavenJar(false)
.incompatibleRequireFeatureConfigurationForPic(true)
.incompatibleStricArgumentOrdering(false)
Expand All @@ -248,6 +248,8 @@ public abstract static class Builder {

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);
Expand Down Expand Up @@ -298,8 +300,6 @@ public abstract static class Builder {

public abstract Builder incompatibleNoTransitiveLoads(boolean value);

public abstract Builder incompatibleRemapMainRepo(boolean value);

public abstract Builder incompatibleRemoveNativeMavenJar(boolean value);

public abstract Builder incompatibleStricArgumentOrdering(boolean value);
Expand All @@ -311,3 +311,4 @@ public abstract static class Builder {
public abstract SkylarkSemantics build();
}
}

Loading

0 comments on commit 2dcbd36

Please sign in to comment.