In Compiler Architecture section, state explicitly you assume the compiler do not change between build #1860
Labels
A-compiler-architecture
Area: high-level compiler architecture
A-incr-comp
Area: incremental compilation
A-query-system
Area: query system
E-medium
Difficulty: might require some prior knowledge or code reading
I-confusing
Issue: info is confusing to readers
T-compiler
Relevant to compiler team
I have been slightly confused while reading https://rustc-dev-guide.rust-lang.org/queries/incremental-compilation.html . I may or may not be the only one confused, so here is the confusion and a potential way to solve it.
Up until the section "High-level Compiler Architecture", the book was mostly about how to change the compiler. How to compile the compiler. So, while reading the part about incremental compilation, I was assuming that the compiler may change between one execution and the next one.
If it were to be the case, the whole red-green algorithm would fail, as the query DAG content would be pointless. The input could be the same while the output would still change.
In order to help future reader, I suggest adding a note, somewhere, mentioning that this entire incremental compilation is done by assuming that the same compiler is used during the previous and the current compilation.
Of course, I may be wrong. May be it still work even when you change rustc. If so, that would be a good thing to note it too
The text was updated successfully, but these errors were encountered: