feat: Unify ic-cdk to v0.18.6#6264
Merged
Merged
Conversation
Remove ic-cdk-next which used to be ic-cdk v0.18.0-beta.2 Also bump: ic-canister-sig-creation = "1.3.0" ic-vetkeys = "0.4.0" canbench-rs = "0.2.1" so that they transitively depend on ic-cdk v0.18. Fix ic-vetkeys API usage change in ic/rs/tests/consensus/vetkd/vetkd_key_life_cycle_test.rs
If async code is involved, also use spawn_017_compat.
If the change needed is straight-forward (replace few API), then just change it.
… candid error words
Also include `ic-cdk-executor` in external_crates.bzl and specify it with the latest v1.0.2 which contains a fix.
These files have #[cfg(target_arch = "wasm32")], but `cargo clippy --all-targets` couldn't detect deprecated code under it.
by update IC0_TRAP_BACKTRACE in rs/execution_environment/tests/backtraces.rs. The change is caused by `ic-cdk-executor` v1.0.2.
…_tests/storage_reservation_test by update the RESERVED_BY_SNAPSHOT constant.
This is majorly a dependency upgrade. No behavior changes is expected.
We rely on existing CI to detect any regression.
basvandijk
approved these changes
Aug 19, 2025
mbjorkqvist
approved these changes
Aug 19, 2025
lwshang
commented
Aug 19, 2025
NikolaMilosa
approved these changes
Aug 19, 2025
gregorydemay
approved these changes
Aug 19, 2025
Contributor
gregorydemay
left a comment
There was a problem hiding this comment.
Thanks @lwshang for this huge effort!
Use a different entry-point which takes arguments so that the default skipping quota takes effect.
michael-weigelt
approved these changes
Aug 20, 2025
Sawchord
approved these changes
Aug 20, 2025
aterga
reviewed
Aug 20, 2025
aterga
reviewed
Aug 20, 2025
aterga
reviewed
Aug 20, 2025
aterga
approved these changes
Aug 20, 2025
nikolay-komarevskiy
approved these changes
Aug 20, 2025
This was referenced Sep 15, 2025
github-merge-queue Bot
pushed a commit
that referenced
this pull request
Sep 18, 2025
Follow-up to #6264 to remove the introduced `#![allow(deprecated)]` in the code of the `ic-ckbtc-minter` canister: 1. in [`rs/bitcoin/ckbtc/minter/src/main.rs`](https://github.com/dfinity/ic/blob/3794e29f4a7b0174dd40539262a22ef48bd7d6de/rs/bitcoin/ckbtc/minter/src/main.rs#L1) 2. in [`rs/bitcoin/ckbtc/minter/src/lib.rs`](https://github.com/dfinity/ic/blob/3794e29f4a7b0174dd40539262a22ef48bd7d6de/rs/bitcoin/ckbtc/minter/src/lib.rs#L1) 3. in [`rs/bitcoin/ckbtc/minter/tests/tests.rs`](https://github.com/dfinity/ic/blob/3794e29f4a7b0174dd40539262a22ef48bd7d6de/rs/bitcoin/ckbtc/minter/tests/tests.rs#L1) The changes in the ckBTC minter API are due to changes in the return type of `get_canister_status`, which is a debug endpoint where backwards-compatibility is not guaranteed.
github-merge-queue Bot
pushed a commit
that referenced
this pull request
Sep 26, 2025
Follow-up to #6264 to remove the introduced `#![allow(deprecated)]` in the code of the `ic-btc-checker` canister: 1. in [`rs/bitcoin/checker/src/main.rs`](https://github.com/dfinity/ic/blob/9f9baad64d118b2f357a69a6021891019f0e8350/rs/bitcoin/checker/src/main.rs#L1) 2. in [`rs/bitcoin/checker/tests/tests.rs`](https://github.com/dfinity/ic/blob/9f9baad64d118b2f357a69a6021891019f0e8350/rs/bitcoin/checker/tests/tests.rs#L1)
This was referenced May 22, 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.
This PR unifies the
ic-cdkdependency to v0.18.6.Background
A while ago, the release of
ic-cdkv0.18 caused some issues. We discovered that mixing different versions ofic-cdkwithin a single canister could break execution, a problem that often occurred when a project's dependencies relied on differentic-cdkversions.To fix this, we extracted the asynchronous execution logic into a new crate,
ic-cdk-executor. As long as different versions ofic-cdkdepend on the same version of the executor crate, they can now coexist. We patched older versions ofic-cdk(v0.17 and below) to useic-cdk-executorv0.1.0, andic-cdkv0.18 and later now use the stableic-cdk-executorv1.0.Because the executor crate is designed to only allow one version in a dependency tree, we're doing a one-time migration to unify all ic-cdk dependencies in the ic mono-repo to the latest v0.18.6.
Major Changes
Dependency Upgrades
Wrap custom canister entry-points in executor_context
Some canister entry-points are defined using the
#[export_name = "..."]annotation instead ofic-cdkmacros like#[update]. The function body are now required to be wrapped inic_cdk::futures::in_executor_contextoric_cdk::futures::in_query_executor_context. This is a replacement for the removedic_cdk::setup().Example:
=>
Replace
decoding_quotawithdecode_withExample:
=>
The entry-points using
decode_withoption will be rendered asblobin the auto-generated Candid interface.To preserve the original type information, the Candid auto-generation is disabled by
hidden = true. And a dummy function is added to generate the desired Candid type.Annotate
#![allow(deprecated)]To keep this PR focused and manageable, we've used
#![allow(deprecated)]to suppress warnings in files that call deprecatedic-cdkAPIs. These APIs are safe to continue using for now, and this approach allows us to postpone the necessary code refactoring. The task of updating these APIs can now be handled by the respective teams that own this code.API replacement
For files that only use a few deprecated
ic-cdkAPIs, we've replaced them directly. For example:ic_cdk::spawn->ic_cdk::futures::spwan_017_compatic_cdk::id->ic_cdk::api::canister_selfic_cdk::caller->ic_cdk::api::msg_calleric_cdk::api::set_certified_data->ic_cdk::api::certified_data_setic_cdk::api::canister_balance->ic_cdk::api::canister_cycle_balanceic_cdk::api::stable->ic_cdk::stableWhat's Next?
This migration provides the foundation for future work. Owning teams are encouraged to refactor their code away from the deprecated ic-cdk APIs. A comprehensive migration guide is available to assist with this process.