Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Arthur-Milchior opened this issue Jan 27, 2024 · 0 comments

Comments

@Arthur-Milchior
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant