Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shallow realisations should go back to using regular drv paths #11897

Open
Ericson2314 opened this issue Nov 18, 2024 · 0 comments
Open

Shallow realisations should go back to using regular drv paths #11897

Ericson2314 opened this issue Nov 18, 2024 · 0 comments

Comments

@Ericson2314
Copy link
Member

This works especially nicely in conjunction with #11896

For deep realisations, using "derivation hashes modulo" helps save space. But for shallow ones, it achieves nothing, since those are already keyed on resolved derivations, which are always distinct modulo ways of producing inputs.

For shallow ones, we should just go back to using store paths, which will be simpler, and save implementations that only care about CA derivations from having to implement the cumbersome and ATerm-encumbered "derivation hash modulo" algorithm.

This is tantamount to reverting bab1cda for shallow realisations; note that that affects all derivations.

Ericson2314 added a commit to obsidiansystems/nix that referenced this issue Feb 25, 2025
I refactored the way that input resolution works in `DerivationGoal`. To
be honest, it is probably unclear to the reader whether this new way is
better or worse. I suppose *intrinsic* motivation, I can say that

- the more structured use of `inputGoal` (a local variable) is better
  than the shotgrun approach with `inputDrvOutputs`

- A virtual `waiteeDone` was a hack, and now it's gone.

However, the *real* motivation of this is not the above things, but that
it is needed for my mammoth refactor fixing NixOS#11897 and NixOS#11928.

It is nice that this step could come first, rather than making that
refactor even bigger.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant