Skip to content

In Compiler Architecture section, state explicitly you assume the compiler do not change between build #1860

Open
@Arthur-Milchior

Description

@Arthur-Milchior

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-compiler-architectureArea: high-level compiler architectureA-incr-compArea: incremental compilationA-query-systemArea: query systemE-mediumDifficulty: might require some prior knowledge or code readingI-confusingIssue: info is confusing to readersT-compilerRelevant to compiler team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions