Get rid of impureOutputHash; fix possible bug#6346
Conversation
I don't agree that this already handles that case. An impure derivation is not conceptually the same as a derivation that isn't sandboxed and not fixed-output. You could imagine derivations that are not sandboxed and not fixed-output, but are still expected to have a reproducible result (e.g. a derivation that uses ccache to build something remotely). |
|
We conversely, one might want to cache actually impure derivations more normally, in a "per transaction" substitution map. Still, I will split this up so the second commit doesn't hold back the first. |
aa99703 to
27b5d2a
Compare
impureOutputHash
1094e42 to
76692cc
Compare
76692cc to
643e782
Compare
impureOutputHashimpureOutputHash; fix possible bug
|
In the meeting today @edolstra mentioned that, as we discussed in the past, we don't necessary want to make impure derivations work "just like" CA derivations. A thing I forgot to point out was that floating CA derivations are already not handled specially. The only special case in Impure derivations are certainly not fixed output, so I don't think we are going to run into any problems here. |
|
|
Yeah, but low priority. |
I do not believe there is any problem with computing `hashDerivationModulo` the normal way with impure derivations. Conversely, the way this used to work is very suspicious because two almost-equal derivations that only differ in depending on different impure derivations could have the same drv hash modulo. That is very suspicious because there is no reason to think those two different impure derivations will end up producing the same content-addressed data! Co-authored-by: Alain Zscheile <zseri.devel@ytrizja.de>
643e782 to
50912d0
Compare
|
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/2024-02-12-nix-team-meeting-minutes-212-5/60216/1 |
Motivation
I do not believe there is any problem with computing
hashDerivationModulothe normal way with impure derivations.Conversely, the way this used to work is very suspicious because two almost-equal derivations that only differ in depending on different impure derivations could have the same drv hash modulo. That is very suspicious because there is no reason to think those two different impure derivations will end up producing the same content-addressed data!
Context
Checklist for maintainers
Maintainers: tick if completed or explain if not relevant
tests/**.shsrc/*/tests