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

Allow the unstable --error-format flag to be changed from an environment variable #1693

Closed
trixnz opened this issue Jul 29, 2016 · 1 comment
Labels
T-compiler Relevant to the compiler team, which will review and decide on the RFC. T-dev-tools Relevant to the development tools team, which will review and decide on the RFC.

Comments

@trixnz
Copy link

trixnz commented Jul 29, 2016

Continuing discussion from https://github.com/saviorisdead/RustyCode/issues/146:

I've been working towards adding support for the new JSON error format in RustyCode, however I've come across a bit of an issue that slows down iteration times for users. If the IDE extension issues cargo commands with the RUSTFLAGS environment variable set to -Z unstable-options --error-format=json then, as expected, we get JSON error messages. If the user was to then manually compile their project from a terminal with cargo build, the fingerprint changes because RUSTFLAGS no longer matches the last compilation and a full rebuild occurs. This also occurs the next time the user builds or saves the file from the IDE for the same reason.

For some (clippy, check) subcommands, this can be avoided by passing the arguments in directly. Some, however, can't facilitate this (bench, test, build, etc.).

I propose a new environment variable called RUST_ERROR_FORMAT that only changes the format that errors are printed with without changing the fingerprint. My only concern is that because this is an unstable feature right now, such an environment variable would bypass -Z unstable-options.

@nrc nrc added T-dev-tools Relevant to the development tools team, which will review and decide on the RFC. T-compiler Relevant to the compiler team, which will review and decide on the RFC. labels Aug 4, 2016
@trixnz
Copy link
Author

trixnz commented Aug 10, 2016

Closed in favour of moving this into Cargo now that JSON output is stabilised: rust-lang/cargo#2982

@trixnz trixnz closed this as completed Aug 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-compiler Relevant to the compiler team, which will review and decide on the RFC. T-dev-tools Relevant to the development tools team, which will review and decide on the RFC.
Projects
None yet
Development

No branches or pull requests

2 participants