Repository navigation
Fix prefix in digit-led enum XDR-JSON names - #639
Merged
Merged
Conversation
dmkozh
approved these changes
Nov 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Serialize enum members whose prefix-stripped name starts with a digit using that stripped name in XDR-JSON, so
BinaryFuseFilterTypebecomes8_bit,16_bitand32_bitwhile the Rust variants stayB8Bit,B16BitandB32Bit.This change is backwards compatible for reading.
Why
The generator prepends the prefix's first letter to make a valid Rust identifier because Rust identifiers cannot begin with a number. However that also meant the serde derived name that ends up in XDR-JSON was producing names like
b8_bitinstead of8_bit. To be consistent with SEP-51 the name in the XDR-JSON should be8_bit.Close #634
Known limitations
N/A