Skip to content

feat(icrc-ledger-types): FI-1894: Gate ic-stable-structures dependency behind storable feature flag#7520

Merged
mbjorkqvist merged 13 commits intomasterfrom
mathias-FI-1894-icrc-ledger-types-stable-structures-feature-flag
Apr 16, 2026
Merged

feat(icrc-ledger-types): FI-1894: Gate ic-stable-structures dependency behind storable feature flag#7520
mbjorkqvist merged 13 commits intomasterfrom
mathias-FI-1894-icrc-ledger-types-stable-structures-feature-flag

Conversation

@mbjorkqvist
Copy link
Copy Markdown
Contributor

@mbjorkqvist mbjorkqvist commented Nov 3, 2025

Make the impl Storable for Account and the dependency on ic-stable-structures opt-in via a storable feature flag on the icrc-ledger-types crate. By default (no features enabled), neither the trait implementation nor the dependency is included. This allows external consumers of the icrc-ledger-types crate to independently choose the version of ic-stable-structures to depend on (if any), but it does require them to either enable the storable feature or implement Storable for a wrapper type for Account if they are currently storing that in stable structures.

Within this repository, all crates use the storable Bazel target of icrc-ledger-types, because a single binary can only link one version of a crate, and since the ICRC ledger needs storable, virtually all other crates end up in the same binary dependency graph (transitively through //rs/ledger_suite/icrc1:icrc1). A _no_storable Bazel target is available but has no practical use within the repo currently.

@github-actions github-actions Bot added the feat label Nov 3, 2025
@mbjorkqvist mbjorkqvist changed the title feat(icrc-ledger-types): FI-1894: Remove ic-stable-structures dependency with no_storable feature flag feat(icrc-ledger-types): FI-1894: Gate ic-stable-structures dependency behind storable feature flag Apr 14, 2026
@mbjorkqvist mbjorkqvist added the CI_ALL_BAZEL_TARGETS Runs all bazel targets label Apr 14, 2026
@mbjorkqvist mbjorkqvist marked this pull request as ready for review April 14, 2026 13:57
@mbjorkqvist mbjorkqvist requested a review from a team as a code owner April 14, 2026 13:57
@github-actions github-actions Bot added the @defi label Apr 14, 2026
Copy link
Copy Markdown
Contributor

@gregorydemay gregorydemay left a comment

Choose a reason for hiding this comment

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

Thanks @mbjorkqvist ! LGTM, some minor comments

Comment thread packages/icrc-ledger-types/BUILD.bazel
Comment thread packages/icrc-ledger-types/CHANGELOG.md Outdated
@mbjorkqvist mbjorkqvist added this pull request to the merge queue Apr 16, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 16, 2026
@mbjorkqvist mbjorkqvist added this pull request to the merge queue Apr 16, 2026
Merged via the queue into master with commit b35dfed Apr 16, 2026
37 checks passed
@mbjorkqvist mbjorkqvist deleted the mathias-FI-1894-icrc-ledger-types-stable-structures-feature-flag branch April 16, 2026 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants