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

Tracking issue for cache-messages #6986

Closed
4 tasks done
ehuss opened this issue May 27, 2019 · 3 comments · Fixed by #7450
Closed
4 tasks done

Tracking issue for cache-messages #6986

ehuss opened this issue May 27, 2019 · 3 comments · Fixed by #7450
Labels
A-cache-messages Area: caching of compiler messages C-tracking-issue Category: A tracking issue for something unstable.

Comments

@ehuss
Copy link
Contributor

ehuss commented May 27, 2019

Implementation PR: #6933
Documentation: https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#cache-messages

Summary
Caches the output from rustc so that future runs can redisplay previous warnings.

cargo +nightly check -Z cache-messages

This also fixes some interleaved output from parallel compilers, like #6848.

Unresolved issues

  • short messages are not supported. Either the rustc JSON output needs to include an additional field with the short rendered form, or cargo and rustc need to share a diagnostics rendering library and the JSON format extended to support that.
  • rustdoc does not support --json-rendered=termcolor, so its output is currently uncolored.
  • --json-rendered needs to be stabilized (or redesigned, see first point).
  • A major goal of properly redisplaying clippy warnings is not yet finished. Clippy shares the same fingerprint with cargo check. The fingerprint or metadata hash needs to include that clippy is in use to fix this. Also, the clippy wrapper needs to only be applied to member crates, not registry dependencies.
@ehuss ehuss added the C-tracking-issue Category: A tracking issue for something unstable. label May 27, 2019
bors added a commit that referenced this issue Jul 23, 2019
Force clippy to run.

This causes `cargo clippy-preview` to always run, instead of possibly emitting no output if it is run a second time.

This is just a personal preference of mine, but I think would be better behavior which we have talked about before.  I don't think the arguments that it should be "fast" like `cargo check` apply here.  Once [cache-messages](#6986) is stabilized, this can be removed.
@ehuss ehuss added the A-cache-messages Area: caching of compiler messages label Sep 21, 2019
@bors bors closed this as completed in b03182a Oct 15, 2019
@apiraino
Copy link

@ehuss now that #6933 and #7450 are merged, is there another main issue to track on this topic or it's done (i.e. 🍾)?

Thanks!

@ehuss
Copy link
Contributor Author

ehuss commented Oct 15, 2019

It should be done. It should be in nightly the day after rust-lang/rust#65445 lands.

@BatmanAoD
Copy link
Member

🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cache-messages Area: caching of compiler messages C-tracking-issue Category: A tracking issue for something unstable.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants