Skip to content

fix(ic-cdk-management-canister): fix docs.rs build#698

Merged
lwshang merged 4 commits intomainfrom
fix/ic-cdk-management-canister-docsrs
Mar 10, 2026
Merged

fix(ic-cdk-management-canister): fix docs.rs build#698
lwshang merged 4 commits intomainfrom
fix/ic-cdk-management-canister-docsrs

Conversation

@lwshang
Copy link
Contributor

@lwshang lwshang commented Mar 10, 2026

Summary

  • Fix docs.rs build for ic-cdk-management-canister by adding #![cfg_attr(docsrs, feature(doc_cfg))] and rustdoc-args = ["--cfg=docsrs"] to its metadata.
  • Add a docsrs CI job that simulates docs.rs builds (nightly + --cfg docsrs + --all-features + wasm32-unknown-unknown) for all wasm-targeted public crates.
  • Clean up unused rustdoc-args/rustc-args from ic-cdk and ic-cdk-timers, and remove unused #![cfg_attr(docsrs, feature(doc_cfg))] from ic-cdk.

Test plan

  • docsrs CI job passes
  • Existing doc CI job still passes
  • Local: RUSTDOCFLAGS="--cfg docsrs -D warnings" cargo +nightly doc --no-deps --all-features --target wasm32-unknown-unknown -p ic-cdk-management-canister

🤖 Generated with Claude Code

lwshang and others added 3 commits March 10, 2026 11:52
…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>
@lwshang lwshang marked this pull request as ready for review March 10, 2026 16:43
@lwshang lwshang requested a review from a team as a code owner March 10, 2026 16:43
@lwshang lwshang merged commit c6fd273 into main Mar 10, 2026
17 checks passed
@lwshang lwshang deleted the fix/ic-cdk-management-canister-docsrs branch March 10, 2026 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants