Skip to content

Use Undefined for enums when it's explicitly defined.#548

Merged
kainino0x merged 2 commits intowebgpu-native:mainfrom
lokokung:undefined
Jun 18, 2025
Merged

Use Undefined for enums when it's explicitly defined.#548
kainino0x merged 2 commits intowebgpu-native:mainfrom
lokokung:undefined

Conversation

@lokokung
Copy link
Collaborator

No description provided.

@lokokung lokokung requested review from eliemichel and kainino0x June 16, 2025 22:00
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.

For some others we just set the default to undefined in the yml:

default: undefined

That's a bit simpler IMO, would it work here?

@lokokung
Copy link
Collaborator Author

lokokung commented Jun 17, 2025

That would work, yes, but that is harder to maintain atm since ensuring that we include the default values in those cases is hard. The change will ensure that even if we forget to include the default value, that we will use undefined.

I can also update the existing ones to add the default, but I think that doing it programmatically will be more future-proof.

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.

SG, one comment then.

@kainino0x
Copy link
Collaborator

Also it would be nice to remove the default: undefined lines that aren't needed anymore.

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.

LGTM!

@kainino0x kainino0x merged commit 4f61785 into webgpu-native:main Jun 18, 2025
5 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