aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/skyframe/PrecomputedValue.java
diff options
context:
space:
mode:
authorGravatar janakr <janakr@google.com>2017-09-25 21:48:27 +0200
committerGravatar Vladimir Moskva <vladmos@google.com>2017-09-26 12:30:42 +0200
commitc8dce99f7d4a5a6fdd129cdaab7c3434f4f5141a (patch)
treeeb22ba90f3dfedeff575381f4af3b46153da42bb /src/main/java/com/google/devtools/build/lib/skyframe/PrecomputedValue.java
parentaa12ec3dc70797c3c514f9f08a976c6ad79ffd38 (diff)
Stop injecting WorkspaceStatusAction into the Skyframe graph as a precomputed value. Instead, manually check if the value has changed, and if it has, invalidate its consuming WorkspaceStatusValue node, forcing its re-evaluation, where it will pick up the new value.
This seems more awkward than the original code, but it is more correct in spirit: injecting a precomputed value which can change even while the source state does not is a smell. Long-term, the key for the WorkspaceStatusValue should incorporate a hash of the action, and that hash should be in the configuration, just as other configuration flags are. That isn't possible right now just because we don't have configuration trimming, and we drop all nodes on configuration changes, so putting workspace status options into the configuration would lose change pruning whenever we changed workspace status options. If/when those problems are fixed, we can extend this change to have WorkspaceStatusFunction continue to request the action out-of-band, but keyed by the hash. Then we can stop invalidating stale nodes. See also https://github.com/bazelbuild/bazel/issues/3785. PiperOrigin-RevId: 169947071
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/skyframe/PrecomputedValue.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/skyframe/PrecomputedValue.java4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/PrecomputedValue.java b/src/main/java/com/google/devtools/build/lib/skyframe/PrecomputedValue.java
index 5f7c242428..1b7ccc9472 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/PrecomputedValue.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/PrecomputedValue.java
@@ -19,7 +19,6 @@ import com.google.common.base.Suppliers;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.devtools.build.lib.actions.ActionAnalysisMetadata;
-import com.google.devtools.build.lib.analysis.WorkspaceStatusAction;
import com.google.devtools.build.lib.analysis.buildinfo.BuildInfoFactory;
import com.google.devtools.build.lib.analysis.buildinfo.BuildInfoFactory.BuildInfoKey;
import com.google.devtools.build.lib.packages.RuleVisibility;
@@ -95,9 +94,6 @@ public final class PrecomputedValue implements SkyValue {
static final Precomputed<Map<String, String>> ACTION_ENV =
new Precomputed<>(LegacySkyKey.create(SkyFunctions.PRECOMPUTED, "action_env"));
- static final Precomputed<WorkspaceStatusAction> WORKSPACE_STATUS_KEY =
- new Precomputed<>(LegacySkyKey.create(SkyFunctions.PRECOMPUTED, "workspace_status_action"));
-
static final Precomputed<ImmutableList<ActionAnalysisMetadata>> COVERAGE_REPORT_KEY =
new Precomputed<>(LegacySkyKey.create(SkyFunctions.PRECOMPUTED, "coverage_report_actions"));