Skip to content

queryMissing: read derivations from the eval store - #16433

Open
Mic92 wants to merge 1 commit into
NixOS:masterfrom
Mic92:query-missing-eval-store
Open

queryMissing: read derivations from the eval store#16433
Mic92 wants to merge 1 commit into
NixOS:masterfrom
Mic92:query-missing-eval-store

Conversation

@Mic92

@Mic92 Mic92 commented Sep 6, 2026

Copy link
Copy Markdown
Member

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.

Motivation

Context


Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

@github-actions github-actions Bot added new-cli Relating to the "nix" command with-tests Issues related to testing. PRs with tests have some priority store Issues and pull requests concerning the Nix store labels Sep 6, 2026
Comment thread src/libstore/misc.cc
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.
@Mic92
Mic92 force-pushed the query-missing-eval-store branch from 9a52cd7 to 1bcd163 Compare September 6, 2026 10:41
* 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);

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@xokdvium

xokdvium commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

@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

@xokdvium

xokdvium commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

In the interim this seems fine to me, but we sure as hell need a better abstraction for union stores to avoid this mess.

@Mic92

Mic92 commented Sep 8, 2026

Copy link
Copy Markdown
Member Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-cli Relating to the "nix" command store Issues and pull requests concerning the Nix store with-tests Issues related to testing. PRs with tests have some priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants