-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Print out the output line that fails json parsing #33392
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
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
Perhaps we could just print out all of the output of the compiler when the compiler finishes? That way we can also see things like the exit code and the entirety of stderr (which may have information like about a panic) |
@@ -72,7 +72,8 @@ fn parse_line(file_name: &str, line: &str) -> Vec<Error> { | |||
expected_errors | |||
} | |||
Err(error) => { | |||
panic!("failed to decode compiler output as json: `{}`", error); | |||
panic!("failed to decode compiler output as json: `{}` when parsing: {}", error, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, I think I agree with @alexcrichton, seems like we should pass in output
and -- in the event of error -- print both the entire output and the failed line
. It might be better still to pass in more context (such as stderr etc) -- basically the ProcRes
struct, I think it's called? Then we can just call fatal_proc_res
which dumps a lot of context iirc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(when these errors crop up on a bot, the more context the better)
Sure - sounds good. Something like that? |
I think that this may either want to |
@alexcrichton - updated PR to call fatal_proc_rec instead. |
☔ The latest upstream changes (presumably #33228) made this pull request unmergeable. Please resolve the merge conflicts. |
🔒 Merge conflict |
Fix for old school error issues, improvements to new school This PR: * Fixes some old school error issues, specifically #33559, #33543, #33366 * Improves wording borrowck errors with match patterns * De-emphasize multi-line spans, so we don't color the single source character when we're trying to say "span starts here" * Rollup of #33392 (which should help fix #33390) r? @nikomatsakis
To help with debugging issues with some of the unit tests on various platforms, go ahead and print out the output line that fails a json parse.
Should help with tracking down #33390.
cc @alexcrichton