Skip to content

feat: migrate to ic-cdk 0.20 - #11069

Draft
nmattia wants to merge 2 commits into
nm-ic-cdk-callfrom
nm-ic-cdk-bump
Draft

feat: migrate to ic-cdk 0.20#11069
nmattia wants to merge 2 commits into
nm-ic-cdk-callfrom
nm-ic-cdk-bump

Conversation

@nmattia

@nmattia nmattia commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

This builds on recent work and completes the migration to ic-cdk 0.20 (0.20.2 to be precise).

This introduces a dependency on the new (extracted) crate ic-cdk-management-canister.

Important note: the GetUtxosRequest exported by bitcoin_canister does not implement Clone or Ord anymore, though we rely on it for BTreeMap ordering. To avoid breaking any sort of compatibility, we wrap this new type in a newtype and have a custom implementation with the same behavior as the old type.

One note: the old ic-cdk version 0.19 is still pulled in transitively via ic-canister-runtime. This will be handled separately.

This builds on recent work and completes the migration to ic-cdk 0.20
(0.20.2 to be precise).

This introduces a dependency on the new (extracted) crate
`ic-cdk-management-canister`.

Important note: the `GetUtxosRequest` exported by `bitcoin_canister`
does _not_ implement `Clone` or `Ord` anymore, though we rely on it for
BTreeMap ordering. To avoid breaking any sort of compatibility, we wrap
this new type in a newtype and have a custom implementation with the
same behavior as the old type.

One note: the old ic-cdk version 0.19 is still pulled in transitively
via `ic-canister-runtime`. This will be handled separately.
@github-actions github-actions Bot added the feat label Aug 7, 2026
@nmattia

nmattia commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

This requires #11055 to merge first

pull Bot pushed a commit to mikeyhodl/ic that referenced this pull request Aug 10, 2026
… 0.20 (dfinity#11073)

<!-- ccr-slack-attribution -->
_Requested by **Nicolas Mattia, Mathias Björkqvist** · [Slack
thread](https://dfinity.slack.com/archives/CL7Q2RXUM/p1786105631218959?thread_ts=1786105631.218959&cid=CL7Q2RXUM)_

## Summary

Bump the `ic-canister-runtime` pin in the root `Cargo.toml` from `0.2.0`
to `0.2.3` so that `canhttp` (and anything depending on it) stops
pulling in `ic-cdk 0.19` transitively.

**Before:** `ic-canister-runtime = "0.2.0"` (resolves to `0.2.1` in
`Cargo.lock`), which depends on `ic-cdk 0.19.0`. `canhttp`'s latest
release already moved to `ic-cdk 0.20` + `ic-canister-runtime`, but
because `ic-canister-runtime` itself was pinned to an old version here,
that path kept resolving back down to `ic-cdk 0.19`.

**After:** `ic-canister-runtime = "0.2.3"` (the latest version on
crates.io as of this PR), which depends on `ic-cdk ^0.20.1`. This lets
`canhttp` and its dependents resolve onto `ic-cdk 0.20` instead of
`0.19`.

Related/context:
- dfinity#11069 — migrates the direct
`ic-cdk` dependency to `0.20.2`, but explicitly leaves this transitive
path through `ic-canister-runtime` for later ("This will be handled
separately").
- dfinity#11055 — prerequisite for dfinity#11069
(migrates remaining `ic-cdk::call` call sites to the new `Call` API).
- Neither dfinity#11069 nor dfinity#11055 touches the `ic-canister-runtime` pin, so
this PR is complementary, not redundant, and can land independently of
them.

## Changes

- `Cargo.toml`: `ic-canister-runtime = "0.2.0"` → `"0.2.3"`
- `bazel/rust.MODULE.bazel`: matching `crate.spec(package =
"ic-canister-runtime", version = "^0.2.0")` → `"^0.2.3"`

## Known limitation / what still needs to happen in CI

`Cargo.lock` and the Bazel crate-index lockfiles
(`Cargo.Bazel.json.lock` / `Cargo.Bazel.toml.lock`) are **not**
regenerated in this PR. Regenerating them (`cargo update`,
`./bin/bazel-pin.sh`) requires fetching workspace git dependencies (e.g.
`dfinity-lab/build-info`, used elsewhere in the workspace) that this
sandbox environment cannot reach, and `bazel` itself is not available in
the sandbox. I expect CI's lockfile-autofix job to regenerate both
lockfiles against this `Cargo.toml`/`MODULE.bazel` change.

## How Verified

Confirmed on crates.io that `ic-canister-runtime 0.2.3` is the latest
published version and its `Cargo.toml` depends on `ic-cdk ^0.20.1` (not
`0.19`). Could not run `cargo check` / `bazel build` locally for the
reason above — please rely on CI for the actual lockfile regeneration
and build/test verification.

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: IDX GitHub Automation <infra+github-automation@dfinity.org>
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.

1 participant