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

Actually remove scale-info from tree and prep for 0.11.1 #49

Merged
merged 1 commit into from
Feb 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ The format is based on [Keep a Changelog].

[Keep a Changelog]: http://keepachangelog.com/en/1.0.0/

## 0.11.1 - 2023-02-16

- `scale-info` was still being pulled in via `scale-type-resolver`; this has now been fixed

## 0.11.0 - 2023-02-09

Up until now, this crate depended heavily on `scale_info` to provide the type information that we used to drive our decoding of types. This release removes the explicit dependency on `scale-info`, and instead depends on `scale-type-resolver`, which offers a generic `TypeResolver` trait whose implementations are able to provide the information needed to decode types (see [this PR](https://github.com/paritytech/scale-decode/pull/45) for more details). So now, the traits and types in `scale-decode` have been made generic over which `TypeResolver` is used to help decode things. `scale-info::PortableRegistry` is one such implementation of `TypeResolver`, and so can continue to be used in a similar way to before.
Expand Down
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ members = [
resolver = "2"

[workspace.package]
version = "0.11.0"
version = "0.11.1"
authors = ["Parity Technologies <[email protected]>"]
edition = "2021"
license = "Apache-2.0"
Expand All @@ -17,5 +17,5 @@ keywords = ["parity", "scale", "decoding"]
include = ["Cargo.toml", "src/**/*.rs", "README.md", "LICENSE"]

[workspace.dependencies]
scale-decode = { version = "0.11.0", path = "scale-decode" }
scale-decode-derive = { version = "0.11.0", path = "scale-decode-derive" }
scale-decode = { version = "0.11.1", path = "scale-decode" }
scale-decode-derive = { version = "0.11.1", path = "scale-decode-derive" }
3 changes: 2 additions & 1 deletion scale-decode/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ scale-decode-derive = { workspace = true, optional = true }
primitive-types = { version = "0.12.0", optional = true, default-features = false }
smallvec = "1.10.0"
derive_more = { version = "0.99.17", default-features = false, features = ["from", "display"] }
scale-type-resolver = "0.1"
scale-type-resolver = { version = "0.1.1", default-features = false }

[dev-dependencies]
scale-info = { version = "2.7.0", default-features = false, features = ["bit-vec", "derive"] }
Expand All @@ -42,3 +42,4 @@ trybuild = "1.0.72"
# Enable the scale-info feature for testing.
scale-bits = { version = "0.5.0", default-features = false, features = ["scale-info"] }
primitive-types = { version = "0.12.0", default-features = false, features = ["scale-info"] }
scale-type-resolver = { version = "0.1.1", default-features = false, features = ["scale-info"] }
2 changes: 1 addition & 1 deletion scale-decode/src/visitor/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ pub trait Visitor: Sized {
#[derive(Debug, Clone, PartialEq, Eq, derive_more::From, derive_more::Display)]
pub enum DecodeError {
/// Type ID was not found
#[display(fmt = "Could not find type with ID '{_0:?}'")]
#[display(fmt = "Could not find type with ID '{_0}'")]
TypeIdNotFound(String),
/// A low level error trying to resolve a type.
#[display(fmt = "Failed to resolve type: {_0}")]
Expand Down
Loading