Skip to content

Commit

Permalink
Small tweak to version injection logic to tolerate injecting versions…
Browse files Browse the repository at this point in the history
… not comparable with the graph version.

PiperOrigin-RevId: 423822037
  • Loading branch information
justinhorvitz authored and copybara-github committed Jan 24, 2022
1 parent e2abe2b commit 440e16d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -243,12 +243,12 @@ public abstract class SkyframeExecutor implements WalkableGraphFactory, Configur
protected MemoizingEvaluator memoizingEvaluator;
private final MemoizingEvaluator.EmittedEventState emittedEventState =
new MemoizingEvaluator.EmittedEventState();
private final PackageFactory pkgFactory;
protected final PackageFactory pkgFactory;
private final WorkspaceStatusAction.Factory workspaceStatusActionFactory;
private final FileSystem fileSystem;
protected final BlazeDirectories directories;
protected final ExternalFilesHelper externalFilesHelper;
private final BugReporter bugReporter;
protected final BugReporter bugReporter;

/**
* Measures source artifacts read this build. Does not include cached artifacts, so is less useful
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -922,7 +922,7 @@ public void injectVersionForNonHermeticFunction(Version version) {
skyKey);
Preconditions.checkNotNull(version, skyKey);
Preconditions.checkState(
version.atMost(evaluatorContext.getGraphVersion()),
!evaluatorContext.getGraphVersion().lowerThan(version),
"Invalid injected version (%s > %s) for %s",
version,
evaluatorContext.getGraphVersion(),
Expand Down

0 comments on commit 440e16d

Please sign in to comment.