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

Add ValidationFlags::BINDINGS #2156

Merged
merged 1 commit into from
Dec 13, 2022
Merged

Add ValidationFlags::BINDINGS #2156

merged 1 commit into from
Dec 13, 2022

Conversation

kvark
Copy link
Member

@kvark kvark commented Dec 7, 2022

Part of gfx-rs/wgpu#4409

A few things to think about here:

  1. Is the scope of the flag chosen soundly? I was considering INTERFACE first, but it could be considered too wide of a scope.
  2. Can this be released as a patch? I.e. is adding a bitflag a breaking change?

Copy link
Member

@teoxoy teoxoy left a comment

Choose a reason for hiding this comment

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

  1. Is the scope of the flag chosen soundly? I was considering INTERFACE first, but it could be considered too wide of a scope.

What would INTERFACE include that the current BINDINGS doesn't?
(Is this question about naming or behavior?)

  1. Can this be released as a patch? I.e. is adding a bitflag a breaking change?

I don't think so because a call to all() would include the newly added flag.

src/valid/interface.rs Show resolved Hide resolved
src/valid/interface.rs Show resolved Hide resolved
@kvark
Copy link
Member Author

kvark commented Dec 13, 2022

What would INTERFACE include that the current BINDINGS doesn't?
(Is this question about naming or behavior?)

kinda both, but BINDINGS is ok.

I don't think so because a call to all() would include the newly added flag.

Is this a problem though? the behavior of all would be the same, just the value is a bit different.

@teoxoy
Copy link
Member

teoxoy commented Dec 13, 2022

I don't think so because a call to all() would include the newly added flag.

Is this a problem though? the behavior of all would be the same, just the value is a bit different.

What I imagined could cause a problem is let's say as a user I call all() then proceed to "peel off" individual flags and then check if the bitflags is_empty().

This feels similar to rust's adding new enum variants (without non_exhaustive) which is also a breaking change.

Copy link
Member

@teoxoy teoxoy left a comment

Choose a reason for hiding this comment

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

LGTM

@kvark
Copy link
Member Author

kvark commented Dec 13, 2022

Ok, thanks for reviewing this @teoxoy !
I'm not blocked on this version being released as a patch, FYI, was just wondering if that's something to expect.

@kvark kvark merged commit 76d30e5 into gfx-rs:master Dec 13, 2022
@kvark kvark deleted the bindings branch December 13, 2022 17:59
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