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

Fix parsing of diagnostics from binaries #36

Merged
merged 4 commits into from
Nov 15, 2022
Merged

Fix parsing of diagnostics from binaries #36

merged 4 commits into from
Nov 15, 2022

Conversation

Jake-Shadle
Copy link
Member

When spirv tools output error messages, particularly validation, they often print out a block of extra information (typically instructions) after the top level error message. The compiled versions were "handling" this since it was all stuffed into a single string, but when parsing the messages from stderr we were just discarding this additional information since they weren't formatted how the top-level message was formatted. So now we actually handle that, and have an additional notes field in the message/diagnostic that we parse that additional information into so that it can be treated distinctly from the top-level error message.

@Jake-Shadle Jake-Shadle requested a review from eddyb October 28, 2022 15:39
@Jake-Shadle
Copy link
Member Author

(this also made me realize the gets_error_message test had already shown there was this difference between installed and compiled, but apparently I went for the lazy route and just chopped off the end that was different, oops)

Copy link
Contributor

@eddyb eddyb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this! Left some review comments (nothing super important though, I don't think).

tests/val.rs Outdated Show resolved Hide resolved
src/cmd.rs Outdated Show resolved Hide resolved
src/cmd.rs Show resolved Hide resolved
src/cmd.rs Outdated Show resolved Hide resolved
src/error.rs Outdated Show resolved Hide resolved
Jake-Shadle and others added 3 commits October 28, 2022 22:26
Co-authored-by: Eduard-Mihai Burtescu <[email protected]>
Co-authored-by: Eduard-Mihai Burtescu <[email protected]>
@eddyb eddyb merged commit 701f40b into main Nov 15, 2022
@eddyb eddyb deleted the fix-message-parsing branch November 15, 2022 11:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants