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

cli: Include file path in WGSL parse error #1708

Merged
merged 1 commit into from
Jan 29, 2022

Conversation

rhysd
Copy link
Contributor

@rhysd rhysd commented Jan 29, 2022

Adding the file path to WGSL parse error output from naga would be better since a tool which uses the output can easily parse the file path from it

Before:

error: expected global item ('struct', 'let', 'var', 'type', ';', 'fn') or the end of the file, found '['
  ┌─ wgsl:5:1
  │
5 │ [[group(1), binding(0)]]
  │ ^ expected global item ('struct', 'let', 'var', 'type', ';', 'fn') or the end of the file

Could not parse WGSL

After:

error: expected global item ('struct', 'let', 'var', 'type', ';', 'fn') or the end of the file, found '['
  ┌─ /path/to/test.wgsl:5:1
  │
5 │ [[group(1), binding(0)]]
  │ ^ expected global item ('struct', 'let', 'var', 'type', ';', 'fn') or the end of the file

Could not parse WGSL

@kvark kvark merged commit f98053a into gfx-rs:master Jan 29, 2022
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