Hardcode experimental_bep_report_only_important_artifacts to true, moving the flag to the graveyard.
RELNOTES: None
PiperOrigin-RevId: 258136011
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/TargetCompleteEvent.java b/src/main/java/com/google/devtools/build/lib/analysis/TargetCompleteEvent.java
index 077cd2e..aab8910 100644
--- a/src/main/java/com/google/devtools/build/lib/analysis/TargetCompleteEvent.java
+++ b/src/main/java/com/google/devtools/build/lib/analysis/TargetCompleteEvent.java
@@ -25,7 +25,6 @@
import com.google.devtools.build.lib.actions.EventReportingArtifacts;
import com.google.devtools.build.lib.analysis.TopLevelArtifactHelper.ArtifactsInOutputGroup;
import com.google.devtools.build.lib.analysis.config.BuildConfiguration;
-import com.google.devtools.build.lib.analysis.config.CoreOptions;
import com.google.devtools.build.lib.analysis.configuredtargets.RuleConfiguredTarget;
import com.google.devtools.build.lib.analysis.test.InstrumentedFilesInfo;
import com.google.devtools.build.lib.analysis.test.TestConfiguration;
@@ -117,7 +116,6 @@
private final BuildEventId configEventId;
private final Iterable<String> tags;
private final ExecutableTargetData executableTargetData;
- private final boolean bepReportOnlyImportantArtifacts;
private TargetCompleteEvent(
ConfiguredTargetAndData targetAndData,
@@ -156,11 +154,6 @@
isTest
? targetAndData.getConfiguredTarget().getProvider(TestProvider.class).getTestParams()
: null;
- // It should be safe to set this to true for targets that don't have a configuration - they
- // should not have any output files either.
- this.bepReportOnlyImportantArtifacts =
- configuration == null
- || configuration.getOptions().get(CoreOptions.class).bepReportOnlyImportantArtifacts;
InstrumentedFilesInfo instrumentedFilesProvider =
targetAndData.getConfiguredTarget().get(InstrumentedFilesInfo.SKYLARK_CONSTRUCTOR);
if (instrumentedFilesProvider == null) {
@@ -395,7 +388,7 @@
public ReportedArtifacts reportedArtifacts() {
ImmutableSet.Builder<NestedSet<Artifact>> builder = ImmutableSet.builder();
for (ArtifactsInOutputGroup artifactsInGroup : outputs) {
- if (!bepReportOnlyImportantArtifacts || artifactsInGroup.areImportant()) {
+ if (artifactsInGroup.areImportant()) {
builder.add(artifactsInGroup.getArtifacts());
}
}
@@ -417,7 +410,7 @@
private Iterable<OutputGroup> getOutputFilesByGroup(ArtifactGroupNamer namer) {
ImmutableList.Builder<OutputGroup> groups = ImmutableList.builder();
for (ArtifactsInOutputGroup artifactsInOutputGroup : outputs) {
- if (bepReportOnlyImportantArtifacts && !artifactsInOutputGroup.areImportant()) {
+ if (!artifactsInOutputGroup.areImportant()) {
continue;
}
OutputGroup.Builder groupBuilder = OutputGroup.newBuilder();
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 55ad390..9497e68 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
@@ -568,15 +568,6 @@
+ "target_environment values.")
public Label autoCpuEnvironmentGroup;
- @Option(
- name = "experimental_bep_report_only_important_artifacts",
- defaultValue = "false",
- documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS,
- effectTags = {OptionEffectTag.AFFECTS_OUTPUTS, OptionEffectTag.LOADING_AND_ANALYSIS},
- metadataTags = {OptionMetadataTag.EXPERIMENTAL},
- help = "If false, the BEP no longer contains information about hidden output groups.")
- public boolean bepReportOnlyImportantArtifacts;
-
/** Values for --experimental_dynamic_configs. */
public enum ConfigsMode {
/**
diff --git a/src/test/shell/integration/build_event_stream_test.sh b/src/test/shell/integration/build_event_stream_test.sh
index f1a41a5..92c5405 100755
--- a/src/test/shell/integration/build_event_stream_test.sh
+++ b/src/test/shell/integration/build_event_stream_test.sh
@@ -936,19 +936,9 @@
rm bep.txt
}
-function test_bep_report_all_artifacts() {
- bazel build --test_output=all --build_event_text_file=bep.txt \
- --experimental_bep_report_only_important_artifacts=false //pkg:true \
- || fail "Build failed but should have succeeded"
- cat bep.txt >> "$TEST_log"
- expect_log "_hidden_top_level_INTERNAL_"
- rm bep.txt
-}
-
function test_bep_report_only_important_artifacts() {
bazel build --test_output=all --build_event_text_file=bep.txt \
- --experimental_bep_report_only_important_artifacts=true //pkg:true \
- || fail "Build failed but should have succeeded"
+ //pkg:true || fail "Build failed but should have succeeded"
cat bep.txt >> "$TEST_log"
expect_not_log "_hidden_top_level_INTERNAL_"
rm bep.txt