rust-lang / rust-lang/rust

Stale RUSTC_LOG with incremental compilation.

Open
#156,981 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-incr-comp C-bug needs-triage
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

Steps to reproduce: set RUSTC_LOG=<some filter> and compile some code (via Cargo). Make a change, clear RUSTC_LOG and compile again. The old value will still be active. I tried it with a built-from-source compiler but I see no reason it won't work with a distributed compiler too (except that there most log levels are disabled).

Since RUSTC_LOG only affects secondary compiler output, I'd expect the value to not be saved across compilation sessions. Or at least ignore the old sessions. The current behavior is very confusing.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue through Cargo with incremental compilation: set RUSTC_LOG, compile code, change it, clear RUSTC_LOG, and compile again. Trace where the compiler or incremental-compilation process retains the logging value across sessions. Done means the cleared variable no longer affects the later compilation, with regression coverage for the reported sequence.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.