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

Update scale-decode requirement from 0.4.0 to 0.5.0 #70

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dependabot[bot]
Copy link

@dependabot dependabot bot commented on behalf of github Mar 14, 2023

Updates the requirements on scale-decode to permit the latest version.

Release notes

Sourced from scale-decode's releases.

v0.5.0

0.5.0

This release shifts scale-decode to being a mirror of a new scale-encode crate, and:

  • Adds a new IntoVisitor trait that types can implement if there is a Visitor which can be used to decode into them.
  • Adds a new DecodeAsType trait to mirror the EncodeAsType trait there; any type that implements IntoVisitor automatically implements DecodeAsType.
  • Adds a new DecodeAsFields trait to mirror EncodeAsFields, implemented for tuple and struct types.
  • Moves the Visitor trait into a sub module and re-works the interface to allow zero copy decoding, allow more concise implementations of it, and provide a fallback escape hatch to allow for more arbitrary DecodeAsType implementations from it.
  • Implements DecodeAsType (via Visitor and IntoVisitor impls) and DecodeAsFields on common types.
  • Adds a DecodeAsType derive macro to auto-generate impls on custom struct and enum types.

Any Visitor impls will need to be updated to use the refined Visitor trait; this should be fairly mechanical (check out the examples and follow the compiler guidance to do this). Otherwise, the rest of the changes are additive and just make it easier to implement this trait and obtain a DecodeAsType implementation, if desired.

Changed

  • Add DecodeAsType backed by Visitor impls for standard types. (#11)
Changelog

Sourced from scale-decode's changelog.

0.5.0

This release shifts scale-decode to being a mirror of a new scale-encode crate, and:

  • Adds a new IntoVisitor trait that types can implement if there is a Visitor which can be used to decode into them.
  • Adds a new DecodeAsType trait to mirror the EncodeAsType trait there; any type that implements IntoVisitor automatically implements DecodeAsType.
  • Adds a new DecodeAsFields trait to mirror EncodeAsFields, implemented for tuple and struct types.
  • Moves the Visitor trait into a sub module and re-works the interface to allow zero copy decoding, allow more concise implementations of it, and provide a fallback escape hatch to allow for more arbitrary DecodeAsType implementations from it.
  • Implements DecodeAsType (via Visitor and IntoVisitor impls) and DecodeAsFields on common types.
  • Adds a DecodeAsType derive macro to auto-generate impls on custom struct and enum types.

Any Visitor impls will need to be updated to use the refined Visitor trait; this should be fairly mechanical (check out the examples and follow the compiler guidance to do this). Otherwise, the rest of the changes are additive and just make it easier to implement this trait and obtain a DecodeAsType implementation, if desired.

Changed

  • Add DecodeAsType backed by Visitor impls for standard types. (#11)

0.4.0

This release removes bitvec and the 32bit feature flag needed to play nicely with it and leans on scale-bits instead to decode bit sequences. We add a CI check to ensure that it can be compiled to WASM.

Changed

  • Use scale-bits to handle bit sequences (#5

0.3.0

This release makes the following changes:

  • All visit_ functions are now handed a TypeId too, which is just a wrapper around a u32 corresponding to the type being decoded in the given PortableRegistry. Useful if you'd like to look up more details about the type in the registry or just store the ID somewhere.
  • visit_compact_ functions are now handed a visitor::Compact struct which one can obtain the compact encoded value from, or view the path to the compact encoded value via a .locations() method, in case the compact value is actually nested within named/unnamed structs. The TypeId provided is always the outermost type of the Compact value, and so one can also discover this information by manual traversal (but since we have to traverse anyway..).
  • The Variant type has been simplified and largely just allows access to the underlying Composite type to decode.
  • The Composite type now provides direct access to the (yet-to-be-decoded) fields, and offers separate decode_item and decode_item_with_name methods to make decoding into named or unnamed shapes a little easier.
  • Visitor related types are now exported directly from the visitor module rather than a visitor::types module.
  • Lifetimes have been made more precise to avoid unnecessary lifetime related errors.

Changed

  • TypeIds, more info for compact encoded values and tidy up (#1)

... (truncated)

Commits
  • c0b614b Update changelog and prep for 0.5.0 release (#14)
  • 69ffb61 Bump Swatinem/rust-cache from 2.0.1 to 2.2.1 (#12)
  • 4d40391 Add DecodeAsType backed by Visitor impls for standard types. (#11)
  • f3b7276 match hash and version
  • 9871fac Bump Swatinem/rust-cache from 1.3.0 to 2.0.1
  • See full diff in compare view

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Updates the requirements on [scale-decode](https://github.com/paritytech/scale-decode) to permit the latest version.
- [Release notes](https://github.com/paritytech/scale-decode/releases)
- [Changelog](https://github.com/paritytech/scale-decode/blob/main/CHANGELOG.md)
- [Commits](paritytech/scale-decode@v0.4.0...v0.5.0)

---
updated-dependencies:
- dependency-name: scale-decode
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file rust Pull requests that update Rust code labels Mar 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file rust Pull requests that update Rust code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants