Skip to content

chore: DEFI-2304 remove deprecated ic-cdk imports in ic-icp-archive#10318

Draft
gregorydemay wants to merge 1 commit into
masterfrom
gdemay/DEFI-2304-icp-archive
Draft

chore: DEFI-2304 remove deprecated ic-cdk imports in ic-icp-archive#10318
gregorydemay wants to merge 1 commit into
masterfrom
gdemay/DEFI-2304-icp-archive

Conversation

@gregorydemay
Copy link
Copy Markdown
Contributor

@gregorydemay gregorydemay commented May 27, 2026

Summary

Extends DEFI-2304 — removing the file-level #![allow(deprecated)] attribute introduced in #6264.

This PR handles ic-icp-archive:

  • ic_cdk::api::call::{arg_data_raw, reply, reply_raw}ic_cdk::api::{msg_arg_data, msg_reply}.
  • ic_cdk::api::calleric_cdk::api::msg_caller.
  • ic_cdk::api::printic_cdk::api::debug_print.
  • ic_cdk::api::stable::stable_sizeic_cdk::stable::stable_size.

The few reply(tuple) sites are rewritten as msg_reply(candid::Encode!(...).unwrap()) so the on-wire Candid output is unchanged. No behavior change.

Follows the pattern set by #6755 (ic-btc-checker), #6761 (ic-ckbtc-minter), #10289, #10290, #10291, and #10317.

Migrate the ICP archive canister off `ic_cdk::api::call::{arg_data_raw, reply,
reply_raw}`, `ic_cdk::api::{caller, print}` and `ic_cdk::api::stable::stable_size`
(all deprecated in #6264), and drop the file-level `#![allow(deprecated)]`. The
call sites now use `ic_cdk::api::{msg_arg_data, msg_caller, msg_reply, debug_print}`
and `ic_cdk::stable::stable_size`; the few `reply(tuple)` sites are rewritten as
`msg_reply(candid::Encode!(...).unwrap())` to preserve the same Candid output.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR removes deprecated ic-cdk API usage from the ICP archive canister and drops the file-level deprecated allowance, continuing the DEFI-2304 migration with no intended behavior change.

Changes:

  • Replaces deprecated argument/reply/caller/logging APIs with msg_arg_data, msg_reply, msg_caller, and debug_print.
  • Rewrites manual Candid replies using candid::Encode!.
  • Updates stable memory metric calls to use ic_cdk::stable::stable_size.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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