Skip to content

Commit

Permalink
Automated rollback of commit 98c3a40.
Browse files Browse the repository at this point in the history
*** Reason for rollback ***

Rollforward - does not fix things because of 78971a9

*** Original change description ***

Automated rollback of commit 4ca3db2.

*** Reason for rollback ***

Breaks targets in the depot

*** Original change description ***

Propagate all experimental options to the exec configuration

Experimental flags that don't propagate to the exec configuration can create very surprising failure cases for both Bazel users and devs. Unless there is a valid reason to not pr...

***

PiperOrigin-RevId: 684826130
Change-Id: Ieca011bdb3ed4e5fbaf494565a40841f09b40c40
  • Loading branch information
hvadehra authored and copybara-github committed Oct 11, 2024
1 parent b9c9cd6 commit 8cbd6a3
Show file tree
Hide file tree
Showing 12 changed files with 172 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ public class CoreOptions extends FragmentOptions implements Cloneable {
defaultValue = "false",
documentationCategory = OptionDocumentationCategory.EXECUTION_STRATEGY,
effectTags = {OptionEffectTag.EXECUTION},
metadataTags = {OptionMetadataTag.EXPERIMENTAL},
help =
"If this option is enabled, filesets will treat all output artifacts as regular files. "
+ "They will not traverse directories or be sensitive to symlinks.")
Expand Down Expand Up @@ -488,6 +489,7 @@ public ExecConfigurationDistinguisherSchemeConverter() {
name = "experimental_collect_code_coverage_for_generated_files",
defaultValue = "false",
documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS,
metadataTags = {OptionMetadataTag.EXPERIMENTAL},
effectTags = {OptionEffectTag.AFFECTS_OUTPUTS},
help =
"If specified, Bazel will also generate collect coverage information for generated"
Expand Down Expand Up @@ -940,6 +942,7 @@ public OutputPathsConverter() {
defaultValue = "false",
documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
effectTags = {OptionEffectTag.LOADING_AND_ANALYSIS},
metadataTags = {OptionMetadataTag.EXPERIMENTAL},
help =
"When set, select functions with no matching clause will return an empty value, instead"
+ " of failing. This is to help use cquery diagnose failures in select.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ public static class TestOptions extends FragmentOptions {
OptionEffectTag.LOADING_AND_ANALYSIS,
OptionEffectTag.LOSES_INCREMENTAL_STATE,
},
metadataTags = {OptionMetadataTag.EXPERIMENTAL},
help =
"When enabled, --trim_test_configuration will not trim the test configuration for rules"
+ " marked testonly=1. This is meant to reduce action conflict issues when non-test"
Expand Down Expand Up @@ -244,6 +245,7 @@ public static class TestOptions extends FragmentOptions {
defaultValue = "false",
documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
effectTags = {OptionEffectTag.AFFECTS_OUTPUTS, OptionEffectTag.LOADING_AND_ANALYSIS},
metadataTags = {OptionMetadataTag.EXPERIMENTAL},
help =
"If true, then Blaze will cancel concurrently running tests on the first successful "
+ "run. This is only useful in combination with --runs_per_test_detects_flakes.")
Expand All @@ -269,6 +271,7 @@ public static class TestOptions extends FragmentOptions {
defaultValue = "false",
documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
effectTags = {OptionEffectTag.AFFECTS_OUTPUTS, OptionEffectTag.LOADING_AND_ANALYSIS},
metadataTags = {OptionMetadataTag.EXPERIMENTAL},
help =
"If true, then Bazel fetches the entire coverage data directory for each test during a "
+ "coverage run.")
Expand All @@ -290,6 +293,7 @@ public static class TestOptions extends FragmentOptions {
defaultValue = "false",
documentationCategory = OptionDocumentationCategory.EXECUTION_STRATEGY,
effectTags = {OptionEffectTag.EXECUTION},
metadataTags = {OptionMetadataTag.EXPERIMENTAL},
help = "If true, then Bazel will run coverage postprocessing for test in a new spawn.")
public boolean splitCoveragePostProcessing;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import com.google.devtools.common.options.Option;
import com.google.devtools.common.options.OptionDocumentationCategory;
import com.google.devtools.common.options.OptionEffectTag;
import com.google.devtools.common.options.OptionMetadataTag;
import net.starlark.java.annot.StarlarkBuiltin;
import net.starlark.java.annot.StarlarkMethod;

Expand Down Expand Up @@ -69,6 +70,7 @@ public static final class Options extends FragmentOptions {
defaultValue = "true",
documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
effectTags = {OptionEffectTag.LOADING_AND_ANALYSIS},
metadataTags = {OptionMetadataTag.EXPERIMENTAL},
help =
"If true, the roots of repositories in the runfiles tree are added to PYTHONPATH, so "
+ "that imports like `import mytoplevelpackage.package.module` are valid."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,7 @@ public static class Options extends FragmentOptions {
OptionEffectTag.AFFECTS_OUTPUTS,
OptionEffectTag.LOADING_AND_ANALYSIS,
},
metadataTags = OptionMetadataTag.EXPERIMENTAL,
help = "Enables resource shrinking for android_binary APKs that use ProGuard.")
public boolean useExperimentalAndroidResourceShrinking;

Expand Down Expand Up @@ -661,6 +662,7 @@ public static class Options extends FragmentOptions {
OptionEffectTag.LOADING_AND_ANALYSIS,
OptionEffectTag.LOSES_INCREMENTAL_STATE,
},
metadataTags = OptionMetadataTag.EXPERIMENTAL,
help = "The default value of the exports_manifest attribute on android_library.")
public boolean exportsManifestDefault;

Expand All @@ -669,6 +671,7 @@ public static class Options extends FragmentOptions {
defaultValue = "false",
documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
effectTags = {OptionEffectTag.AFFECTS_OUTPUTS},
metadataTags = {OptionMetadataTag.EXPERIMENTAL},
help =
"Omit AndroidResourcesInfo provider from android_binary rules."
+ " Propagating resources out to other binaries is usually unintentional.")
Expand Down Expand Up @@ -727,6 +730,7 @@ public static class Options extends FragmentOptions {
effectTags = {
OptionEffectTag.CHANGES_INPUTS,
},
metadataTags = {OptionMetadataTag.EXPERIMENTAL},
help = "If enabled, R Jars will be filtered from the test apk built by android_test.")
public boolean filterRJarsFromAndroidTest;

Expand All @@ -739,6 +743,7 @@ public static class Options extends FragmentOptions {
OptionEffectTag.BAZEL_INTERNAL_CONFIGURATION,
OptionEffectTag.ACTION_COMMAND_LINES
},
metadataTags = {OptionMetadataTag.EXPERIMENTAL},
help =
"If enabled, one version enforcement for android_test uses the binary_under_test's "
+ "transitive classpath, otherwise it uses the deploy jar")
Expand All @@ -751,6 +756,7 @@ public static class Options extends FragmentOptions {
effectTags = {
OptionEffectTag.EXECUTION,
},
metadataTags = {OptionMetadataTag.EXPERIMENTAL},
help = "Enable persistent aar extractor by using workers.")
public boolean persistentAarExtractor;

Expand Down Expand Up @@ -929,6 +935,7 @@ public static class Options extends FragmentOptions {
effectTags = {
OptionEffectTag.CHANGES_INPUTS,
},
metadataTags = {OptionMetadataTag.EXPERIMENTAL},
help =
"If enabled and the test instruments an application, all the R classes from the test's "
+ "deploy jar will be removed.")
Expand All @@ -941,6 +948,7 @@ public static class Options extends FragmentOptions {
effectTags = {
OptionEffectTag.CHANGES_INPUTS,
},
metadataTags = {OptionMetadataTag.EXPERIMENTAL},
help =
"If enabled and the android_test defines a binary_under_test, the class filterering "
+ "applied to the test's deploy jar will always filter duplicate classes based "
Expand All @@ -952,6 +960,7 @@ public static class Options extends FragmentOptions {
defaultValue = "false",
documentationCategory = OptionDocumentationCategory.BUILD_TIME_OPTIMIZATION,
effectTags = {OptionEffectTag.ACTION_COMMAND_LINES},
metadataTags = {OptionMetadataTag.EXPERIMENTAL},
help =
"Filter the ProGuard ProgramJar to remove any classes also present in the LibraryJar.")
public boolean filterLibraryJarWithProgramJar;
Expand All @@ -961,6 +970,7 @@ public static class Options extends FragmentOptions {
defaultValue = "false",
documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
effectTags = {OptionEffectTag.CHANGES_INPUTS},
metadataTags = {OptionMetadataTag.EXPERIMENTAL},
help = "Use R.txt from the merging action, instead of from the validation action.")
public boolean useRTxtFromMergedResources;

Expand Down Expand Up @@ -999,6 +1009,7 @@ public static class Options extends FragmentOptions {
defaultValue = "false",
documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
effectTags = {OptionEffectTag.AFFECTS_OUTPUTS},
metadataTags = {OptionMetadataTag.EXPERIMENTAL},
help =
"Disables manifest merging when an android_binary has instruments set (i.e. is used "
+ "for instrumentation testing).")
Expand All @@ -1009,6 +1020,7 @@ public static class Options extends FragmentOptions {
defaultValue = "false",
documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
effectTags = {OptionEffectTag.CHANGES_INPUTS},
metadataTags = {OptionMetadataTag.EXPERIMENTAL},
help =
"Get Java resources from _proguard.jar instead of _deploy.jar in android_binary when "
+ "bundling the final APK.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public class AppleCommandLineOptions extends FragmentOptions {
defaultValue = "false",
documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
effectTags = {OptionEffectTag.NO_OP},
metadataTags = {OptionMetadataTag.EXPERIMENTAL},
help =
"No-op. Kept here for backwards compatibility. This field will be removed in a "
+ "future release.")
Expand Down Expand Up @@ -159,6 +160,7 @@ public class AppleCommandLineOptions extends FragmentOptions {
defaultValue = "true",
documentationCategory = OptionDocumentationCategory.TOOLCHAIN,
effectTags = {OptionEffectTag.LOSES_INCREMENTAL_STATE},
metadataTags = {OptionMetadataTag.EXPERIMENTAL},
help =
"If true, use the most recent Xcode that is available both locally and remotely. If"
+ " false, or if there are no mutual available versions, use the local Xcode version"
Expand Down Expand Up @@ -320,6 +322,7 @@ public class AppleCommandLineOptions extends FragmentOptions {
OptionEffectTag.LOADING_AND_ANALYSIS,
OptionEffectTag.EXECUTION
},
metadataTags = {OptionMetadataTag.EXPERIMENTAL},
help =
"If set, add a \"requires-xcode:{version}\" execution requirement to every Xcode action."
+ " If the Xcode version has a hyphenated label, also add a"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -962,6 +962,7 @@ public Label getMemProfProfileLabel() {
defaultValue = "false",
documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
effectTags = {OptionEffectTag.AFFECTS_OUTPUTS, OptionEffectTag.LOADING_AND_ANALYSIS},
metadataTags = {OptionMetadataTag.EXPERIMENTAL},
help = "If true, coverage for clang will generate an LCOV report.")
public boolean generateLlvmLcov;

Expand Down Expand Up @@ -1008,6 +1009,7 @@ public Label getMemProfProfileLabel() {
OptionEffectTag.EXECUTION,
OptionEffectTag.CHANGES_INPUTS
},
metadataTags = {OptionMetadataTag.EXPERIMENTAL},
help =
"Whether to narrow inputs to C/C++ compilation by parsing #include lines from input"
+ " files. This can improve performance and incrementality by decreasing the size of"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import com.google.devtools.common.options.Option;
import com.google.devtools.common.options.OptionDocumentationCategory;
import com.google.devtools.common.options.OptionEffectTag;
import com.google.devtools.common.options.OptionMetadataTag;

/** {@link Fragment} for {@link GenQuery}. */
@RequiresOptions(options = {GenQueryConfiguration.GenQueryOptions.class})
Expand All @@ -33,6 +34,7 @@ public static class GenQueryOptions extends FragmentOptions {
defaultValue = "true",
documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
effectTags = {OptionEffectTag.BAZEL_INTERNAL_CONFIGURATION},
metadataTags = {OptionMetadataTag.EXPERIMENTAL},
help =
"If true, genquery loads its scope's transitive closure directly instead of by using "
+ "'TransitiveTargetValue' Skyframe work.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public OneVersionEnforcementLevelConverter() {
defaultValue = "false",
documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
effectTags = {OptionEffectTag.UNKNOWN},
metadataTags = {OptionMetadataTag.EXPERIMENTAL},
help =
"If enabled, disallow legacy Java toolchain flags (--javabase, --host_javabase,"
+ " --java_toolchain, --host_java_toolchain) and require the use of --platforms"
Expand Down Expand Up @@ -305,6 +306,7 @@ public OneVersionEnforcementLevelConverter() {
defaultValue = "false",
documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
effectTags = {OptionEffectTag.UNKNOWN},
metadataTags = {OptionMetadataTag.EXPERIMENTAL},
help = "Do not use.")
public boolean runLocalJavaOptimizations;

Expand Down Expand Up @@ -423,6 +425,7 @@ public OneVersionEnforcementLevelConverter() {
defaultValue = "true",
documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
effectTags = {OptionEffectTag.UNKNOWN},
metadataTags = {OptionMetadataTag.EXPERIMENTAL},
help =
"Flag to help transition away from adding test support libraries to the compile-time"
+ " deps of Java test rules.")
Expand All @@ -433,6 +436,7 @@ public OneVersionEnforcementLevelConverter() {
defaultValue = "false",
documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
effectTags = {OptionEffectTag.AFFECTS_OUTPUTS},
metadataTags = {OptionMetadataTag.EXPERIMENTAL},
help = "Whether to validate java_* sources.")
public boolean runAndroidLint;

Expand All @@ -441,6 +445,7 @@ public OneVersionEnforcementLevelConverter() {
defaultValue = "false",
documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
effectTags = {OptionEffectTag.AFFECTS_OUTPUTS},
metadataTags = {OptionMetadataTag.EXPERIMENTAL},
help = "No-op, kept only for backwards compatibility")
public boolean limitAndroidLintToAndroidCompatible;

Expand Down Expand Up @@ -480,6 +485,7 @@ public OneVersionEnforcementLevelConverter() {
defaultValue = "false",
documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
effectTags = {OptionEffectTag.UNKNOWN},
metadataTags = {OptionMetadataTag.EXPERIMENTAL},
help = "No-op, kept only for backwards compatibility")
public boolean experimentalJavaHeaderInputPruning;

Expand All @@ -488,6 +494,7 @@ public OneVersionEnforcementLevelConverter() {
defaultValue = "false",
documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
effectTags = {OptionEffectTag.UNKNOWN},
metadataTags = {OptionMetadataTag.EXPERIMENTAL},
help = "If enabled, turbine is used for all annotation processing")
public boolean experimentalTurbineAnnotationProcessing;

Expand Down Expand Up @@ -565,6 +572,7 @@ public OneVersionEnforcementLevelConverter() {
defaultValue = "true",
documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
effectTags = {OptionEffectTag.UNKNOWN},
metadataTags = {OptionMetadataTag.EXPERIMENTAL},
help = "Enable experimental jspecify integration.")
public boolean experimentalEnableJspecify;

Expand All @@ -573,6 +581,7 @@ public OneVersionEnforcementLevelConverter() {
defaultValue = "false",
documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
effectTags = {OptionEffectTag.UNKNOWN},
metadataTags = {OptionMetadataTag.EXPERIMENTAL},
help = "DO NOT USE")
public boolean autoCreateDeployJarForJavaTests;
}
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ public class J2ObjcCommandLineOptions extends FragmentOptions {
defaultValue = "true",
documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
effectTags = {OptionEffectTag.UNKNOWN},
metadataTags = {OptionMetadataTag.EXPERIMENTAL},
help = "Whether to generate J2ObjC header map in parallel of J2ObjC transpilation.")
public boolean experimentalJ2ObjcHeaderMap;

Expand All @@ -78,6 +79,7 @@ public class J2ObjcCommandLineOptions extends FragmentOptions {
defaultValue = "false",
documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
effectTags = {OptionEffectTag.AFFECTS_OUTPUTS},
metadataTags = {OptionMetadataTag.EXPERIMENTAL},
help = "Whether to generate with shorter header path (uses \"_ios\" instead of \"_j2objc\").")
public boolean experimentalShorterHeaderPath;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@ public String getTypeDescription() {
name = "experimental_py_binaries_include_label",
defaultValue = "false",
documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS,
metadataTags = {OptionMetadataTag.EXPERIMENTAL},
effectTags = {OptionEffectTag.AFFECTS_OUTPUTS},
help = "py_binary targets include their label even when stamping is disabled.")
public boolean includeLabelInPyBinariesLinkstamp;
Expand Down
Loading

0 comments on commit 8cbd6a3

Please sign in to comment.