-
Notifications
You must be signed in to change notification settings - Fork 194
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
Glsl error message improvements #934
Glsl error message improvements #934
Conversation
a413c88
to
b5814b6
Compare
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.
Besides my personal hate for error reporting in libraries there are some problems especially with the expected case in the InvalidToken
error (which should probably be renamed to UnexpectedToken
), great work nonetheless :)
Also I think that in the long run we should rename ParseError
to Error
and add a meta
field to it so that all errors are forced to have metadata information, but that's for another PR.
I'm fine with removing the codespan reporting from this PR and having it just provide more context to the errors, I agree that it isn't really the responsibility of the library. Currently the |
No need to remove it, it's just my personal opinion and the other maintainers already showed support for it being included in the library and it's already included in wgsl as you said but I think we should at least make it optional since some end users may only want to compile their already known working shaders and bringing in another dependency would only increase their compile times with no real benefit |
81b8c1b
to
17fdb9d
Compare
Thank you! Changes look reasonable. Let's get @JCapucho having another look. |
I would like to fix the way the expected tokens are handled in invalid token before merging |
17fdb9d
to
e915b0f
Compare
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.
I'm sorry I didn't express my intent clearly but when I meant a list of tokens I was talking about a literal Vec<Token>
bccd6a8
to
1dee90e
Compare
Looks good to me, let's just have @kvark take a look, I'm going to squash this afterward unless you want to rebase the broken commits with the ci fixes |
480d14c
to
1338361
Compare
I rebased the commits. |
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.
I've double checked the PR and found some small things but we can merge it anyways and fix it later
476be42
to
917a2f2
Compare
Please fix CI and if possible squash the last commit and I'll merge this |
917a2f2
to
6b75cdd
Compare
Thank you for your contribution |
Before:
After: