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

Adds 'make fix' command to keep yml file(s) organized #306

Merged
merged 2 commits into from
Jul 2, 2024

Conversation

lokokung
Copy link
Collaborator

@lokokung lokokung commented Jul 2, 2024

  • Adds dependency on yq library to help with formatting
  • Adds new go script to format the current webgpu.yml file
  • Formats the existing webgpu.yml file so that all the arrays of types are sorted alphabetically.
  • Note: one down-side of this is that all the newlines are dropped in the yml file. We may be able to add another layer of formatting later on if this is desired.

- Adds dependency on yq library to help with formatting
- Adds new go script to format the current webgpu.yml file
- Formats the existing webgpu.yml file so that all the arrays of
  types are sorted alphabetically.
- Note: one down-side of this is that all the newlines are dropped
  in the yml file. We may be able to add another layer of formatting
  later on if this is desired.
@lokokung lokokung requested a review from kainino0x July 2, 2024 21:48
Copy link
Collaborator

@kainino0x kainino0x left a comment

Choose a reason for hiding this comment

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

This is great! I think the YAML file changes are fine, personally.

I have been wanting to run some checks/lints on the YAML file to keep it tidy, this pretty much fixes that! I'd considered a "strict" syntax as well where we avoid bare strings, but that's probably not necessary.

Another thing I've wanted to check is whether the schema is being validated (e.g. if some bare value gets interpreted as a number where we wanted a string, do we catch that?)

@kainino0x kainino0x requested a review from rajveermalviya July 2, 2024 21:58
@lokokung
Copy link
Collaborator Author

lokokung commented Jul 2, 2024

I think that the schema validations happen as a part of the header generation already. Since we call the generation code as a part of the checks, I think that transitively we are validating the schema.

@lokokung lokokung merged commit effd3c0 into webgpu-native:main Jul 2, 2024
4 checks passed
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