Skip to content

Commit 440e16d

Browse files
justinhorvitzcopybara-github
authored andcommitted
Small tweak to version injection logic to tolerate injecting versions not comparable with the graph version.
PiperOrigin-RevId: 423822037
1 parent e2abe2b commit 440e16d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -243,12 +243,12 @@ public abstract class SkyframeExecutor implements WalkableGraphFactory, Configur
243243
protected MemoizingEvaluator memoizingEvaluator;
244244
private final MemoizingEvaluator.EmittedEventState emittedEventState =
245245
new MemoizingEvaluator.EmittedEventState();
246-
private final PackageFactory pkgFactory;
246+
protected final PackageFactory pkgFactory;
247247
private final WorkspaceStatusAction.Factory workspaceStatusActionFactory;
248248
private final FileSystem fileSystem;
249249
protected final BlazeDirectories directories;
250250
protected final ExternalFilesHelper externalFilesHelper;
251-
private final BugReporter bugReporter;
251+
protected final BugReporter bugReporter;
252252

253253
/**
254254
* Measures source artifacts read this build. Does not include cached artifacts, so is less useful

src/main/java/com/google/devtools/build/skyframe/SkyFunctionEnvironment.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -922,7 +922,7 @@ public void injectVersionForNonHermeticFunction(Version version) {
922922
skyKey);
923923
Preconditions.checkNotNull(version, skyKey);
924924
Preconditions.checkState(
925-
version.atMost(evaluatorContext.getGraphVersion()),
925+
!evaluatorContext.getGraphVersion().lowerThan(version),
926926
"Invalid injected version (%s > %s) for %s",
927927
version,
928928
evaluatorContext.getGraphVersion(),

0 commit comments

Comments
 (0)