You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to write a cargo wrapper that formats the errors using the ariadne crate. Using --message-format json allows me to parse the compiler messages and format them, but it also changes the rest of the output (downloading crates, progress bars, etc) into json as well, meaning I either have to parse the human-readable errors instead.
Proposed Solution
Either of the following would work, I have no strong feelings one way or the other, but I suspect the latter might be useful to more people:
Add a message-format that outputs rustc messages (errors, warnings, etc) in json format, but outputs everything else (downloading/building crates, updating crate index, progress bars, etc.) in the normal, human-readable format.
Add --error-format json | human | short to cargo (matching rustc's option) which only affects rustc messages. (would it work to just pass this flag straight to rustc?)
Notes
This might not be the best way to go about what I'm trying to do, please let me know if that's the case.
The text was updated successfully, but these errors were encountered:
Thank you for submitting the issue, and welcome!
You might be interested in #8283, where more discussions happened. I'd in favour of that and close this :)
Problem
I'm trying to write a cargo wrapper that formats the errors using the ariadne crate. Using
--message-format json
allows me to parse the compiler messages and format them, but it also changes the rest of the output (downloading crates, progress bars, etc) into json as well, meaning I either have to parse the human-readable errors instead.Proposed Solution
Either of the following would work, I have no strong feelings one way or the other, but I suspect the latter might be useful to more people:
--error-format json | human | short
to cargo (matching rustc's option) which only affects rustc messages. (would it work to just pass this flag straight to rustc?)Notes
This might not be the best way to go about what I'm trying to do, please let me know if that's the case.
The text was updated successfully, but these errors were encountered: