Open Ericson2314 opened 1 week ago
closes https://github.com/NixOS/nix/issues/7254, which has some alternative suggestions
"Realisation" is not a great term, but "trace" is no better, IMHO. It really tells me nothing about what it is.
How about throwing on an adjective, like "build trace"? That's getting clearer. I want it to be something involving "trace" in order to stay connected to the literature.
Ambiguous with --show-trace
Fair point. Well then there we go: build trace vs eval trace! There are enough simularities that I am glad both use "trace".
Another alternative name that is a bit more distrinct would be kvtrace, with the k and v standing for key and value. That highlights how each kvtrace represents an entry in a map from build inputs to build outputs.
Maybe the whole thing should be called "build trace" or "build trace map"? and an individual one is a "build trace kv pair"?
We might actually be talking about two representations for information about builds.
Excuse my ignorance about undocumented features, but I believe the prior is a realisation, whereas the latter is the more useful and accurate concept for reasoning about build inputs, and perhaps this is the mapping that deserves to be called a build trace? These concepts convey largely the same information, but they give rise to a slightly different data model (or different part of a data model).
To make the distinction a bit more concrete, consider a derivation graph where one of the derivations has an unused testresults
output, containing a timestamp. By comparing realisations, you would falsely flag a frankenbuild, whereas a set of traces would accurately report "no frankenbuild", because none of the impure outputs were used.
"realisation" is a bad term because we already use it for other things (building, including input-addressed derivations) and because it is vague.
The term in https://www.microsoft.com/en-us/research/uploads/prod/2018/03/build-systems.pdf and https://cloud.ins.jku.at/index.php/s/txgoHps6FyNpiDk "trace"; we should use that instead, in documentation and code.