-
Notifications
You must be signed in to change notification settings - Fork 30
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
Release v0.11.0 #127
Release v0.11.0 #127
Conversation
/// A Rust primitive type. | ||
Primitive(TypeDefPrimitive), | ||
/// A type using the [`Compact`] encoding | ||
Compact(TypeDefCompact<T>), | ||
/// A type representing a sequence of bits. | ||
BitSequence(TypeDefBitSequence<T>), | ||
/// A Range type. | ||
Range(TypeDefRange<T>), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh good point. Do you mind mentioning this in the docs as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That it is backwards compatible, or that new variants should be added to the end?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The latter. Something like "Tooling relying on scale-info data generally relies on order to find items. For this reason it is important that public enums add new variants items to the end to ensure backwards compatibility"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've gone a step further and added explicit indices for this and TypeDefPrimitive
, in case people delete or reorder variants.
Added
TypeDef
andTypeDefPrimitive
enums (#127)Also this moves the
Range
variant to the end, for backwards compatibility. /cc @jacogr