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

Stable Serialization of Features #2629

Open
cwfitzgerald opened this issue Apr 25, 2022 · 3 comments
Open

Stable Serialization of Features #2629

cwfitzgerald opened this issue Apr 25, 2022 · 3 comments
Labels
area: infrastructure Testing, building, coordinating issues help required We need community help to make this happen. type: enhancement New feature or request

Comments

@cwfitzgerald
Copy link
Member

cwfitzgerald commented Apr 25, 2022

Description

CI on #2618 failed because the clear command feature flag changed, but the serialized ron traces explicitly output the bitflags, so no longer enabled the clear feature once the flag moved identity.

We should have a serialization that is more stable than this, as we shouldn't be relying on the exact bits.

@cwfitzgerald cwfitzgerald added type: enhancement New feature or request area: infrastructure Testing, building, coordinating issues help required We need community help to make this happen. labels Apr 25, 2022
@coderedart
Copy link
Contributor

related to #1195 maybe.
bitflags/bitflags#262 bitflags 2.0 is considering serializing bitflags as text for human readable formats like json / ron while still using binary for binary formats like bincode.

@KodrAus
Copy link

KodrAus commented May 31, 2022

This is something you should be able to support with the work we've been doing in bitflags where the names of enabled flags can be iterated over along with their values. This is what's now driving our Debug implementation and could be used for serde too if you'd rather anchor to names rather than values.

The main piece of implementation work left before we can put together a 2.0 release that includes the new stuff is: bitflags/bitflags#282

@coderedart
Copy link
Contributor

bitflags 2.0 is released on crates.io.

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

3 participants