-
Notifications
You must be signed in to change notification settings - Fork 6
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
Building with JSON output prints JSON to output window #64
Comments
I looked through the configuration options for the |
@excaliburHisSheath, there's the option 'Use JSON error format' in the atom-build-cargo settings. It's switched on by default. Just switch it off if you prefer the human-readable output. It supports colors on linux and macs. The standard (human-readable) error output format has changed recently and there's a pending PR #63 that adds parsing of the new error format. Until it's merged and the new package version published, only JSON and the current error format (the one used in the stable Rust 1.11 by default) are parsed and displayed by Linter. |
Hmm. While parsing the human-readable output seems like a good start, it's also a bit backward, isn't it? The point of rustc adding JSON output is to make things easier for tools like That said, the current happy medium for me personally is to leave the build panel closed at all time, since the linter output is mostly what I want anyway. Being able to also see the human-readable rustc output would just be a nice bonus since the new error format is just so darn nice. |
You're right, JSON output is aiming to provide a reliable way for IDEs to parse error messages. That's why it's used as the default option now. But many (me included) like the standard output, so I've added its parsing. Atom Build doesn't support output overriding, so parsing JSON and producing the human-readable output from it is not an option now. |
What if cargo could give both representations at the same time? Human readable via stout and json via stderr? I think atom build should not try to mimic this, or you will get a lot of bugs, that the mimicked human readable output deviates from cargo here and there... Just my two cents.. |
I agree that cargo-build shouldn't imitate human-readable output produced by Till the RLS is implemented, I think the most we should do, is to extract all the useful information from the existing output, deliver it to the user in a convenient way by means of Linter, while letting him or her to look at the raw output when needed (ideally, we should remove such need at all). |
I don't love it, but since RLS is the more robust solution long term I understand not trying to over-invest in the current system. Being able to more clearly see the output of the program when run would be a nice improvement in the short term. |
I'm not quite understand what you mean by 'more clearly see the output'. Now, it's possible to have both the nice new human-readable errors in the output window and neatly organized Linter messages at the same time. What would be a more clear output? |
Er, sorry, I was agreeing with your previous statement:
My current use case is that I want to always hide the build panel while building (since seeing the JSON output isn't helpful) but when running with |
Then I'd say this is an Multi-step commands have been suggested and declined. |
Could |
nope, we have no control over that. Also, |
Ah, I was also going to ask about that since I saw @noseglid suggest it for custom build output. In the meantime I think the |
Printing the JSON-formatted errors to the build console isn't terribly helpful. At the very least I would have expected the console to not open when using JSON errors since there's very little useful output it can display (though there's likely still some). Personally I'd prefer to see the human-readable error formatting printed to the console, including niceties like coloring and filename/line numbers being clickable, but I don't know if it's possible to easily reconstruct the human-readable errors from the JSON output.
The text was updated successfully, but these errors were encountered: