Conversation
|
I'm slightly concerned about overridden inputs not being represented in the key, but this may be the lesser evil of the two. |
roberth
left a comment
There was a problem hiding this comment.
Probably best to implement it anyway.
roberth
left a comment
There was a problem hiding this comment.
Coming to think of it, since we have this logic in two places now, it should be factored out, and since we're enabling new behavior, we should test it.
Specifically, eval-tests.nix should check that deduplication works (e.g. with a list-typed option that merges by appending, as usual), and that disabledModules works.
I won't have time for it in the coming days, so feel free to give it a shot.
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
|
Hi there, can I help push this PR forward somehow? |
Feel free to hack on this |
|
@roberth Can't we use inputsHash = builtins.hashString "sha256" (
builtins.toJSON (builtins.mapAttrs (_: v: v.outPath) self.inputs)
); to also pin the inputs for the key? |
|
It's not known which inputs and which transitive inputs matter to the behavior of the module, so that's still a heuristic, and a potentially costly one because you're also fetching inputs that may otherwise not be fetched. I guess the good news is that the problem is still tractable and doesn't require fetching the whole input closure, but we'll have to be more clever about how we model this, and this will require Nix itself to help out a bit. The behavior of a flake is determined by Nix itself, the lock file plus any overrides.
I've opened NixOS/nix#14601 in |
Fixes NixOS/nixpkgs#340361