queryMissing: read derivations from the eval store - #16433
Conversation
With `--eval-store`, `nix build --store ssh-ng://...` printed
don't know how to build these paths:
/nix/store/...-foo.drv
and then built them anyway. printMissing() runs before the builder has
copied any .drv to the destination store, and Store::queryMissing() only
looked there. `nix flake check` uses the same result to decide what to
build, so with an eval store it silently skipped those checks.
Pass the eval store down like queryPartialDerivationOutputMap() already
does. RemoteStore cannot forward it to the daemon and falls back to the
client-side traversal in that case.
9a52cd7 to
1bcd163
Compare
| * store are read from there, like the builder does. | ||
| */ | ||
| virtual MissingPaths queryMissing(const std::vector<DerivedPath> & targets); | ||
| virtual MissingPaths queryMissing(const std::vector<DerivedPath> & targets, Store * evalStore = nullptr); |
There was a problem hiding this comment.
I kept the existing pattern of having pointers here. Also we might have better mechanisms now to solve this. But this looks like another PR.
|
@Ericson2314, how do you feel about stuffing more extraneous eval stores in the store api? Seems... not ideal to me tbh. The issue is also mostly cosmetic too |
|
In the interim this seems fine to me, but we sure as hell need a better abstraction for union stores to avoid this mess. |
|
I hope the bottom line will be that we always keep derivations client side instead of pushing them to a deamon. We only ever need to push source derivations for remote building and have a better, more efficient representation to upload a build graph when we do remote building than those text files we upload today. |
With
--eval-store,nix build --store ssh-ng://...printedand then built them anyway. printMissing() runs before the builder has copied any .drv to the destination store, and Store::queryMissing() only looked there.
nix flake checkuses the same result to decide what to build, so with an eval store it silently skipped those checks.Pass the eval store down like queryPartialDerivationOutputMap() already does. RemoteStore cannot forward it to the daemon and falls back to the client-side traversal in that case.
Motivation
Context
Add 👍 to pull requests you find important.
The Nix maintainer team uses a GitHub project board to schedule and track reviews.