Content-addressed Nix − call for testers

Glad you’re excited about it :slight_smile:

A naive question: what would happen in this case when building a derivation?

The most likely outcomes (from my own testing) are either the build failing (with a more-or-less sensible error message), or a specific Nix command will crash (like I encountered recently). In case that’s your fear, I don’t anticipate very bad things like a store corruption (after all, in addition to the testsuite and my own desktop, there’s at least one machine that builds CA derivations rather heavily, and there hasn’t been any major issue with it).

what happens if __contentAddressed = true is used when the derivation is not reproducible (results in a different output contents across builds)?

It all depends of the exact scenario, but in the simplest case where there’s only one source of truth (either you’re only building locally, or there’s only one binary cache that feeds everything else), it’ll work mostly as input-addressed derivations, in that the first build will be accepted as the “truthful” build, and Nix won’t even try to rebuild it (why should it after all?)

4 Likes