feat(icrc-ledger-types): FI-1894: Gate ic-stable-structures dependency behind storable feature flag#7520
Merged
mbjorkqvist merged 13 commits intomasterfrom Apr 16, 2026
Conversation
… no_storable feature flag
…tructures-feature-flag # Conflicts: # packages/icrc-ledger-types/BUILD.bazel # packages/icrc-ledger-types/CHANGELOG.md
…c-ledger-types-stable-structures-feature-flag # Conflicts: # packages/icrc-ledger-types/src/icrc1/account.rs
…bling a feature flag
Contributor
gregorydemay
left a comment
There was a problem hiding this comment.
Thanks @mbjorkqvist ! LGTM, some minor comments
gregorydemay
approved these changes
Apr 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Make the
impl Storable for Accountand the dependency onic-stable-structuresopt-in via astorablefeature flag on theicrc-ledger-typescrate. By default (no features enabled), neither the trait implementation nor the dependency is included. This allows external consumers of theicrc-ledger-typescrate to independently choose the version ofic-stable-structuresto depend on (if any), but it does require them to either enable thestorablefeature or implementStorablefor a wrapper type forAccountif they are currently storing that in stable structures.Within this repository, all crates use the
storableBazel target oficrc-ledger-types, because a single binary can only link one version of a crate, and since the ICRC ledger needsstorable, virtually all other crates end up in the same binary dependency graph (transitively through//rs/ledger_suite/icrc1:icrc1). A_no_storableBazel target is available but has no practical use within the repo currently.