Remove `experimental_` and rename the flag to `--heuristically_drop_nodes`
PiperOrigin-RevId: 509616051
Change-Id: Ie27cc2f2a8e35a272d79fa160934a1bda670fbbc
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/CommandEnvironment.java b/src/main/java/com/google/devtools/build/lib/runtime/CommandEnvironment.java
index ba9e041..a3bcd45 100644
--- a/src/main/java/com/google/devtools/build/lib/runtime/CommandEnvironment.java
+++ b/src/main/java/com/google/devtools/build/lib/runtime/CommandEnvironment.java
@@ -806,7 +806,7 @@
runtime.getStartupOptionsProvider().getOptions(BlazeServerStartupOptions.class).batch,
commonOptions.keepStateAfterBuild,
commonOptions.trackIncrementalState,
- commonOptions.experimentalHeuristicallyDropNodes,
+ commonOptions.heuristicallyDropNodes,
viewOptions != null && viewOptions.discardAnalysisCache,
reporter);
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/CommonCommandOptions.java b/src/main/java/com/google/devtools/build/lib/runtime/CommonCommandOptions.java
index 1fb2a8c..4f636c5 100644
--- a/src/main/java/com/google/devtools/build/lib/runtime/CommonCommandOptions.java
+++ b/src/main/java/com/google/devtools/build/lib/runtime/CommonCommandOptions.java
@@ -513,7 +513,9 @@
public List<Map.Entry<String, String>> repositoryEnvironment;
@Option(
- name = "experimental_heuristically_drop_nodes",
+ name = "heuristically_drop_nodes",
+ oldName = "experimental_heuristically_drop_nodes",
+ oldNameWarning = false,
defaultValue = "false",
documentationCategory = OptionDocumentationCategory.BUILD_TIME_OPTIMIZATION,
effectTags = {OptionEffectTag.LOSES_INCREMENTAL_STATE},
@@ -522,7 +524,7 @@
+ " and DirectoryListing node is done to save memory. We expect that it is less"
+ " likely that these nodes will be needed again. If so, the program will re-evaluate"
+ " them.")
- public boolean experimentalHeuristicallyDropNodes;
+ public boolean heuristicallyDropNodes;
/** The option converter to check that the user can only specify legal profiler tasks. */
public static class ProfilerTaskConverter extends EnumConverter<ProfilerTask> {
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/NodeDroppingInconsistencyReceiver.java b/src/main/java/com/google/devtools/build/lib/skyframe/NodeDroppingInconsistencyReceiver.java
index de90b97..612e3a5 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/NodeDroppingInconsistencyReceiver.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/NodeDroppingInconsistencyReceiver.java
@@ -26,7 +26,7 @@
/**
* {@link GraphInconsistencyReceiver} for evaluations operating on graphs when {@code
- * --experimental_heuristically_drop_nodes} flag is applied.
+ * --heuristically_drop_nodes} flag is applied.
*
* <p>The expected inconsistency caused by heuristically dropping state nodes should be tolerated
* while all other inconsistencies should result in throwing an exception.
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/SequencedSkyframeExecutor.java b/src/main/java/com/google/devtools/build/lib/skyframe/SequencedSkyframeExecutor.java
index a24fd1d..1549b80 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/SequencedSkyframeExecutor.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/SequencedSkyframeExecutor.java
@@ -725,9 +725,9 @@
if (heuristicallyDropNodes) {
eventHandler.handle(
Event.warn(
- "--experimental_heuristically_drop_nodes was specified with track incremental state"
- + " also being true. The flag is ignored and no node is heuristically dropped"
- + " in the track incremental mode."));
+ "--heuristically_drop_nodes was specified with track incremental state also being"
+ + " true. The flag is ignored and no node is heuristically dropped in the track"
+ + " incremental mode."));
}
this.heuristicallyDropNodes = false;
} else {
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/rewinding/RewindableGraphInconsistencyReceiver.java b/src/main/java/com/google/devtools/build/lib/skyframe/rewinding/RewindableGraphInconsistencyReceiver.java
index 22cb8be..8a33155 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/rewinding/RewindableGraphInconsistencyReceiver.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/rewinding/RewindableGraphInconsistencyReceiver.java
@@ -64,8 +64,8 @@
if (heuristicallyDropNodes
&& NodeDroppingInconsistencyReceiver.isExpectedInconsistency(
key, otherKeys, inconsistency)) {
- // If `--experimental_heuristically_drop_nodes` is enabled, check whether the inconsistency is
- // caused by dropped state node. If so, tolerate the inconsistency and return.
+ // If `--heuristically_drop_nodes` is enabled, check whether the inconsistency is caused by
+ // dropped state node. If so, tolerate the inconsistency and return.
return;
}