rustc does not always update the mtime of all its outputs
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
There are apparently situations involving incremental compilation where rustc will conclude that an output file (e.g. an rmeta file) is already fully up-to-date, and will just not do anything to it. However, build systems (including cargo) typically assume that they can use the mtime to figure out whether an output is up-to-date, so rustc not bumping the mtime of an output can lead to confusion.
We may want to fix rustc so that it always bumps the mtime of its outputs, even if they need no other changes. That should be quite cheap to do, and can avoid a lot of downstream head-scratching such as:
Contributor guide
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
Start by reproducing the incremental-compilation case described for rustc outputs such as rmeta files, then compare the observed mtimes with the downstream behavior noted in Cargo issue #16104. Done means rustc consistently bumps the mtime of every output, including outputs it considers fully up to date.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- build-system, compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100