Skip to content

Commit 3082edc

Browse files
authored
Tweak retain function to avoid issues with recursive types (#206)
* Tweak retain function to avoid issues with recursive types * re-do test suite and ensure type ID also updated still * cargo fmt * prep for patch release
1 parent 2430c33 commit 3082edc

File tree

3 files changed

+407
-366
lines changed

3 files changed

+407
-366
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [2.11.2] - 2024-04-05
9+
10+
- Fix a bug in the `PortableRegistry::retain()` method where recursive types (types containing themselves) were not properly handled.
11+
812
## [2.11.1] - 2024-03-22
913

1014
- Fix a bug in the `PortableRegistry::retain()` method, where a type's id field was not adjusted to the new position of the type in the retained `Vec`.

Cargo.toml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,15 @@ categories.workspace = true
1717
[dependencies]
1818
bitvec = { version = "1", default-features = false, features = ["alloc"], optional = true }
1919
cfg-if = "1.0"
20-
scale-info-derive = { version = "2.11.1", path = "derive", default-features = false, optional = true }
20+
scale-info-derive = { version = "2.11.2", path = "derive", default-features = false, optional = true }
2121
serde = { version = "1", default-features = false, optional = true, features = ["derive", "alloc"] }
2222
derive_more = { version = "0.99.1", default-features = false, features = ["from"] }
2323
scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive"] }
2424
schemars = { version = "0.8", optional = true }
2525

26+
[dev-dependencies]
27+
scale-info-derive = { version = "2.11.2", path = "derive" }
28+
2629
[features]
2730
default = ["std"]
2831
std = [
@@ -57,7 +60,7 @@ members = [
5760
]
5861

5962
[workspace.package]
60-
version = "2.11.1"
63+
version = "2.11.2"
6164
authors = [
6265
"Parity Technologies <[email protected]>",
6366
"Centrality Developers <[email protected]>",

0 commit comments

Comments
 (0)