fix(ic-cdk-management-canister): fix docs.rs build#698
Merged
Conversation
…g feature - Add `#![cfg_attr(docsrs, feature(doc_cfg))]` to ic-cdk-management-canister - Remove the now-unused same attribute from ic-cdk Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add a CI job that builds documentation with nightly + --cfg docsrs + --all-features + wasm32-unknown-unknown target, mirroring the docs.rs build environment. Covers ic-cdk, ic-cdk-bitcoin-canister, ic-cdk-executor, ic-cdk-management-canister, and ic-cdk-timers. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…rs CI - Add rustdoc-args = ["--cfg=docsrs"] to ic-cdk-management-canister (the only crate that uses cfg_attr(docsrs, ...)) - Remove unused rustdoc-args from ic-cdk - Remove unused rustc-args from ic-cdk-timers - Remove unnecessary protoc install from docsrs CI job Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
adamspofford-dfinity
approved these changes
Mar 10, 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.
Summary
ic-cdk-management-canisterby adding#![cfg_attr(docsrs, feature(doc_cfg))]andrustdoc-args = ["--cfg=docsrs"]to its metadata.docsrsCI job that simulates docs.rs builds (nightly +--cfg docsrs+--all-features+wasm32-unknown-unknown) for all wasm-targeted public crates.rustdoc-args/rustc-argsfromic-cdkandic-cdk-timers, and remove unused#![cfg_attr(docsrs, feature(doc_cfg))]fromic-cdk.Test plan
docsrsCI job passesdocCI job still passesRUSTDOCFLAGS="--cfg docsrs -D warnings" cargo +nightly doc --no-deps --all-features --target wasm32-unknown-unknown -p ic-cdk-management-canister🤖 Generated with Claude Code