Skip to content
This repository has been archived by the owner on Jan 29, 2025. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants