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

Release v0.11.0 #127

Merged
merged 4 commits into from
Aug 25, 2021
Merged

Release v0.11.0 #127

merged 4 commits into from
Aug 25, 2021

Conversation

ascjones
Copy link
Contributor

@ascjones ascjones commented Aug 25, 2021

Added

  • Add type parameter getters (#122)
  • Add support for Range and RangeInclusive (#124), (#126)
  • Explicit codec indices for TypeDef and TypeDefPrimitive enums (#127)

Also this moves the Range variant to the end, for backwards compatibility. /cc @jacogr

/// 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>),
Copy link
Contributor

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?

Copy link
Contributor Author

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?

Copy link
Contributor

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"?

Copy link

Choose a reason for hiding this comment

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

+1

Copy link
Contributor Author

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.

@ascjones ascjones merged commit a028631 into master Aug 25, 2021
@ascjones ascjones deleted the aj-release-0.11.0 branch August 25, 2021 09:30
@ascjones ascjones mentioned this pull request Aug 25, 2021
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.

3 participants