fix(compiler): forward verbose flag to rustc for local crates#17006
fix(compiler): forward verbose flag to rustc for local crates#17006raushan728 wants to merge 2 commits into
Conversation
|
r? @weihanglo rustbot has assigned @weihanglo. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
CI is failing on ~50 tests because the snapshots need to be updated with the new Since |
From #16531 (comment)
There was a choice here and you went one route. Please when doing these types of things document your reasoning. Note that the statement wasn't a commitment to do this but a re-iteration of the request to confirm understanding which brings us to #16531 (comment)
I think this is saying that we decided to punt on tracking this is in the hash or fingerprint. Looking at the notes doesn't provide any more insight. @ehuss do you remember which way we landed on this? |
|
I went with fingerprint instead of unit hash because running with Regarding tracking it at all: if we don't dirty the cache, Cargo just replays the previously cached truncated message. So just forwarding the flag wouldn't actually show the full output. To drop the fingerprint tracking entirely if @ehuss confirms we should punt on it. |
|
I don't recall if we landed one way or the other on caching. Right now I don't have a good answer to that myself. The downsides seem clear to me:
These differences are not applicable to the linker error mentioned in the issue, since that wouldn't be cached. If we truly only care about that one message (or any messages with errors), then I would go with not-tracked (since an error isn't cached). That would be the least disruptive, and address the concern in the issue (not seeing the full linker output). The downside is that it wouldn't help with any rustc messages in the future that are not errors but change based on We could always change this in the future, too. |
|
Since errors (like the linker error) aren't cached anyway, going with the "Not tracked" solves the primary issue without thrashing the cache for successful builds. I'll drop the fingerprint tracking, keep just the |
ffa6078 to
dffcb19
Compare
Forwards the verbose flag to rustc when compiling local packages. Ensures users can see full untruncated diagnostics when running cargo build with the verbose flag. Fixes rust-lang#16531
Fixes #16531
This PR forwards the
--verboseflag torustcwhen compiling local packages. This ensures users can see full, untruncated diagnostics (such as detailed linker errors) when runningcargo build --verbose.Note on caching: We intentionally do not track this verbosity state in the fingerprint/cache. Since compiler/linker errors are not cached by Cargo anyway, simply forwarding the flag is sufficient to reveal the full error output without unnecessarily thrashing the cache for successful builds.