ci/eval: fix local full eval
The change to use `builtins.storePath` was good - for when the store path *is* already part of the nix store. In all my tests so far, that was already the case, because I was iterating on the solution and the Eval results stayed the same. But when this is run on a entirely new commit, these the values for `afterDir` and `combinedDir` are *not* in the store, yet. As part of running `eval.full` on a new commit they will be created. `eval.full` is linked up, so that the values passed around there will actually be derivations, which might not be realized, yet. Checking whether the input is a path or not fixes this for both cases.
This commit is contained in:
@@ -13,7 +13,12 @@
|
||||
byName ? false,
|
||||
}:
|
||||
let
|
||||
combined = builtins.storePath combinedDir;
|
||||
# Usually we expect a derivation, but when evaluating in multiple separate steps, we pass
|
||||
# nix store paths around. These need to be turned into (fake) derivations again to track
|
||||
# dependencies properly.
|
||||
# We use two steps for evaluation, because we compare results from two different checkouts.
|
||||
# CI additionalls spreads evaluation across multiple workers.
|
||||
combined = if lib.isDerivation combinedDir then combinedDir else lib.toDerivation combinedDir;
|
||||
|
||||
/*
|
||||
Derivation that computes which packages are affected (added, changed or removed) between two revisions of nixpkgs.
|
||||
|
||||
@@ -11,8 +11,13 @@
|
||||
}:
|
||||
|
||||
let
|
||||
before = builtins.storePath beforeDir;
|
||||
after = builtins.storePath afterDir;
|
||||
# Usually we expect a derivation, but when evaluating in multiple separate steps, we pass
|
||||
# nix store paths around. These need to be turned into (fake) derivations again to track
|
||||
# dependencies properly.
|
||||
# We use two steps for evaluation, because we compare results from two different checkouts.
|
||||
# CI additionalls spreads evaluation across multiple workers.
|
||||
before = if lib.isDerivation beforeDir then beforeDir else lib.toDerivation beforeDir;
|
||||
after = if lib.isDerivation afterDir then afterDir else lib.toDerivation afterDir;
|
||||
|
||||
/*
|
||||
Computes the key difference between two attrs
|
||||
|
||||
Reference in New Issue
Block a user