Add a skeleton for directives that reports nice errors#6352
Merged
ErichDonGubler merged 2 commits intogfx-rs:trunkfrom Oct 18, 2024
Merged
Conversation
11 tasks
0994648 to
2d56bab
Compare
2d56bab to
b0c008b
Compare
ErichDonGubler
commented
Oct 4, 2024
13 tasks
ErichDonGubler
added a commit
to erichdongubler-mozilla/wgpu
that referenced
this pull request
Oct 5, 2024
a6ac9f2 to
db334f7
Compare
ErichDonGubler
commented
Oct 17, 2024
544a07b to
1f3a0ef
Compare
ErichDonGubler
commented
Oct 18, 2024
be9b1ab to
18907ee
Compare
teoxoy
approved these changes
Oct 18, 2024
18907ee to
25431df
Compare
1. Break out `word_as_ident*` helpers to keep validation of identifiers DRY. 2. Add `peek_*` variant of `Lexer::next_ident_with_span`. This will be consumed immediately in the subsequent commit.
25431df to
96184a7
Compare
This comment was marked as resolved.
This comment was marked as resolved.
96184a7 to
141b839
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Connections
Dependency of #6148.
May conflict with changes in #5701. If this merges first, I'll resolve conflicts there.
Lays groundwork for:
enabledirective #5476 (see also feat: implement F16 support in shaders #5701)diagnostic(…);directives andderivative_uniformitytriggering rule #6148requiresdirective #6350Description
Recommended review experience is commit-by-commit. Each individual commit should pass CI!
There's not a parse path for any directives, let alone what I'm working on with the
diagnostic(…)directive in #6148. It turns out that adding the starting point with some diagnostics is enough code that a PR checkpoint sounds wise. As a bonus, this can also serve as the base for a full solution to #5476 and #6350.Testing
Tests will be added before this PR comes out of draft, to ensure that the error cases added here are covered.
Checklist
cargo fmt.cargo clippy. If applicable, add:--target wasm32-unknown-unknown--target wasm32-unknown-emscriptencargo xtask testto run tests.CHANGELOG.md. See simple instructions inside file.