rust-lang / rust-lang/rustc-dev-guide
In Compiler Architecture section, state explicitly you assume the compiler do not change between build
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 1.9k
- Forks
- 612
- Avg merge
- 17h 24m
- Merged PRs (30d)
- 39
Description
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
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read the incremental compilation page, especially the "High-level Compiler Architecture" section, and verify whether the red-green algorithm assumes the same compiler across builds. Done means documenting that assumption there, or explaining how changed rustc versions are handled if the assumption is incorrect.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers, documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100