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

Bitflags in API traces are hard to write and read #1195

Closed
kvark opened this issue Feb 4, 2021 · 1 comment
Closed

Bitflags in API traces are hard to write and read #1195

kvark opened this issue Feb 4, 2021 · 1 comment
Labels
area: infrastructure Testing, building, coordinating issues help required We need community help to make this happen. type: enhancement New feature or request

Comments

@kvark
Copy link
Member

kvark commented Feb 4, 2021

Is your feature request related to a problem? Please describe.
When writing a playtest or reading an API trace, it's difficult to reason about bitflag values. See https://github.com/gfx-rs/wgpu/pull/1191/files#diff-78d438d1c2e726454851597e74ab167a9579d6cd83d7f712fcea59173cc2b274R27 for example.

Describe the solution you'd like
Something like https://github.com/kvark/bitflags-serial, where the flags are serialized as VALUE | ANOTHER_VALUE
Another alternative is to turn them into structures like Foo { bit_some: bool, bit_other: bool, ...}, but that's more complicated.

Describe alternatives you've considered
Keep them integers but comment on each use...

Additional context
See upstream in bitflags/bitflags#147
Is also a problem for gfx-rs Warden testing infra.

@kvark kvark added type: enhancement New feature or request help required We need community help to make this happen. area: infrastructure Testing, building, coordinating issues labels Feb 4, 2021
@cwfitzgerald
Copy link
Member

Superseded by #2629

@cwfitzgerald cwfitzgerald closed this as not planned Won't fix, can't repro, duplicate, stale Jun 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: infrastructure Testing, building, coordinating issues help required We need community help to make this happen. type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants