Skip to content

cargo udeps check #6906

Description

@bkontur

TODO

  • fix and push partial PRs
  • prepare script or whatever for checking unused modules inside polkadot-sdk, remove or deprecate them
    • test-parachains ?
    • frame-support-test-pallet ?
  • think about other pipelines, e.g. cargo geiger or something similar for checking unsafe deps
  • think about CI jobs and false-positive or alternative with cargo machete or other alternative (Original discussion: https://matrix.to/#/!JUeaZUiYbdrvzvtwSL:parity.io/$RZO0DkdRd3wDUISyCLpd87ZLfbqeKNgKcvjb8grkvdg?via=parity.io)
  • check polkadot-zombienet-sdk-tests why it does not work for that
error: failed to run custom build command for `polkadot-zombienet-sdk-tests v0.1.0 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/polkadot/zombienet-sdk-tests)`

Caused by:
  process didn't exit successfully: `/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/target/debug/build/polkadot-zombienet-sdk-tests-f391b0d6e1a6293f/build-script-build` (exit status: 101)
  --- stderr
  thread 'main' panicked at polkadot/zombienet-sdk-tests/build.rs:30:62:
  called `Result::unwrap()` on an `Err` value: NotPresent
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...

Initial run:

cd <polkadot-sdk-root>
cargo +nightly udeps --workspace --all-features --all-targets --exclude polkadot-zombienet-sdk-tests
unused dependencies:
`asset-hub-rococo-runtime v0.11.0 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/cumulus/parachains/runtimes/assets/asset-hub-rococo)`
└─── dependencies
     └─── "pallet-nfts-runtime-api"
`bridge-hub-rococo-runtime v0.5.0 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo)`
└─── dependencies
     └─── "bp-bridge-hub-polkadot"
`bridge-hub-test-utils v0.7.0 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/cumulus/parachains/runtimes/bridge-hubs/test-utils)`
└─── dependencies
     └─── "bridge-runtime-common"
`chain-spec-guide-runtime v0.0.0 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/docs/sdk/src/reference_docs/chain_spec_runtime)`
├─── dependencies
│    ├─── "pallet-balances"
│    ├─── "pallet-sudo"
│    ├─── "pallet-timestamp"
│    ├─── "pallet-transaction-payment"
│    └─── "pallet-transaction-payment-rpc-runtime-api"
└─── dev-dependencies
     └─── "chain-spec-builder"
`cumulus-client-network v0.7.0 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/cumulus/client/network)`
└─── dev-dependencies
     ├─── "portpicker"
     └─── "substrate-test-utils"
`cumulus-client-pov-recovery v0.7.0 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/cumulus/client/pov-recovery)`
└─── dev-dependencies
     ├─── "portpicker"
     └─── "substrate-test-utils"
`cumulus-relay-chain-inprocess-interface v0.7.0 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/cumulus/client/relay-chain-inprocess-interface)`
└─── dev-dependencies
     └─── "cumulus-test-service"
`cumulus-test-runtime v0.1.0 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/cumulus/test/runtime)`
└─── dependencies
     └─── "pallet-collator-selection"
`cumulus-test-service v0.1.0 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/cumulus/test/service)`
├─── dependencies
│    ├─── "cumulus-client-consensus-relay-chain"
│    └─── "parachains-common"
└─── dev-dependencies
     ├─── "portpicker"
     └─── "substrate-test-utils"
`emulated-integration-tests-common v3.0.0 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/cumulus/parachains/integration-tests/emulated/common)`
└─── dependencies
     └─── "bridge-runtime-common"
`frame-election-provider-solution-type v13.0.0 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/substrate/frame/election-provider-support/solution-type)`
└─── dev-dependencies
     ├─── "frame-election-provider-support"
     ├─── "frame-support"
     ├─── "scale-info"
     └─── "sp-arithmetic"
`frame-election-solution-type-fuzzer v2.0.0-alpha.5 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/substrate/frame/election-provider-support/solution-type/fuzzer)`
└─── dependencies
     └─── "clap"
`frame-executive v28.0.0 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/substrate/frame/executive)`
└─── dependencies
     └─── "aquamarine"
`frame-support v28.0.0 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/substrate/frame/support)`
├─── dependencies
│    └─── "aquamarine"
└─── dev-dependencies
     ├─── "assert_matches"
     └─── "sp-timestamp"
`frame-support-procedural v23.0.0 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/substrate/frame/support/procedural)`
└─── dev-dependencies
     └─── "pretty_assertions"
`frame-support-test v3.0.0 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/substrate/frame/support/test)`
└─── dependencies
     ├─── "frame-benchmarking"
     ├─── "rustversion"
     ├─── "test-pallet"
     └─── "trybuild"
`glutton-westend-runtime v3.0.0 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/cumulus/parachains/runtimes/glutton/glutton-westend)`
└─── dependencies
     └─── "cumulus-primitives-timestamp"
`pallet-bags-list v27.0.0 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/substrate/frame/bags-list)`
└─── dependencies
     └─── "aquamarine"
`pallet-contracts v27.0.0 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/substrate/frame/contracts)`
└─── dev-dependencies
     ├─── "pallet-assets"
     └─── "pallet-message-queue"
`pallet-contracts-mock-network v3.0.0 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/substrate/frame/contracts/mock-network)`
├─── dependencies
│    ├─── "pallet-insecure-randomness-collective-flip"
│    ├─── "pallet-proxy"
│    └─── "pallet-utility"
└─── dev-dependencies
     ├─── "assert_matches"
     └─── "pretty_assertions"
`pallet-contracts-uapi v5.0.0 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/substrate/frame/contracts/uapi)`
└─── dependencies
     └─── "paste"
`pallet-conviction-voting v28.0.0 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/substrate/frame/conviction-voting)`
└─── dev-dependencies
     └─── "pallet-scheduler"
`pallet-delegated-staking v1.0.0 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/substrate/frame/delegated-staking)`
└─── dev-dependencies
     └─── "substrate-test-utils"
`pallet-election-provider-multi-phase v27.0.0 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/substrate/frame/election-provider-multi-phase)`
└─── dependencies
     └─── "pallet-election-provider-support-benchmarking"
`pallet-example-single-block-migrations v0.0.1 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/substrate/frame/examples/single-block-migrations)`
└─── dependencies
     ├─── "frame-executive"
     └─── "frame-try-runtime"
`pallet-fast-unstake v27.0.0 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/substrate/frame/fast-unstake)`
└─── dev-dependencies
     └─── "substrate-test-utils"
`pallet-glutton v14.0.0 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/substrate/frame/glutton)`
└─── dev-dependencies
     └─── "pallet-balances"
`pallet-indices v28.0.0 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/substrate/frame/indices)`
└─── dependencies
     └─── "sp-keyring"
`pallet-migrations v1.0.0 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/substrate/frame/migrations)`
└─── dev-dependencies
     ├─── "frame-executive"
     └─── "sp-block-builder"
`pallet-mixnet v0.4.0 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/substrate/frame/mixnet)`
└─── dependencies
     └─── "frame-benchmarking"
`pallet-nfts-runtime-api v14.0.0 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/substrate/frame/nfts/runtime-api)`
└─── dependencies
     └─── "pallet-nfts"
`pallet-offences v27.0.0 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/substrate/frame/offences)`
└─── dependencies
     └─── "pallet-balances"
`pallet-paged-list v0.6.0 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/substrate/frame/paged-list)`
└─── dependencies
     └─── "frame-benchmarking"
`pallet-revive-fixtures v0.1.0 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/substrate/frame/revive/fixtures)`
└─── dependencies
     ├─── "frame-system"
     └─── "sp-runtime"
`pallet-revive-mock-network v0.1.0 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/substrate/frame/revive/mock-network)`
├─── dependencies
│    ├─── "pallet-proxy"
│    └─── "pallet-utility"
└─── dev-dependencies
     ├─── "assert_matches"
     └─── "pretty_assertions"
`pallet-verify-signature v1.0.0 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/substrate/frame/verify-signature)`
└─── dev-dependencies
     ├─── "pallet-balances"
     ├─── "pallet-collective"
     ├─── "pallet-root-testing"
     └─── "pallet-timestamp"
`pallet-xcm-benchmarks v7.0.0 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/polkadot/xcm/pallet-xcm-benchmarks)`
└─── dev-dependencies
     ├─── "pallet-assets"
     ├─── "pallet-xcm"
     ├─── "polkadot-primitives"
     └─── "polkadot-runtime-common"
`polkadot-node-core-approval-voting-parallel v7.0.0 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/polkadot/node/core/approval-voting-parallel)`
└─── dev-dependencies
     ├─── "polkadot-primitives-test-helpers"
     └─── "polkadot-subsystem-bench"
`polkadot-node-metrics v7.0.0 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/polkadot/node/metrics)`
├─── dependencies
│    └─── "gum"
└─── dev-dependencies
     ├─── "assert_cmd"
     ├─── "polkadot-test-service"
     ├─── "prometheus-parse"
     └─── "substrate-test-utils"
`polkadot-node-primitives v7.0.0 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/polkadot/node/primitives)`
└─── dev-dependencies
     └─── "polkadot-erasure-coding"
`polkadot-omni-node-lib v0.1.0 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/cumulus/polkadot-omni-node/lib)`
└─── dev-dependencies
     ├─── "assert_cmd"
     └─── "wait-timeout"
`polkadot-parachain-bin v4.0.0 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/cumulus/polkadot-parachain)`
└─── dependencies
     └─── "contracts-rococo-runtime"
`polkadot-primitives v7.0.0 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/polkadot/primitives)`
└─── dev-dependencies
     └─── "polkadot-primitives-test-helpers"
`polkadot-rpc v7.0.0 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/polkadot/rpc)`
└─── dependencies
     └─── "sc-rpc-spec-v2"
`polkadot-runtime-parachains v7.0.0 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/polkadot/runtime/parachains)`
├─── dependencies
│    └─── "pallet-vesting"
└─── dev-dependencies
     └─── "thousands"
`polkadot-sdk-docs v0.0.1 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/docs/sdk)`
└─── dependencies
     └─── "parachain-template-runtime"
`polkadot-sdk-frame v0.1.0 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/substrate/frame)`
└─── dev-dependencies
     └─── "pallet-examples"
`polkadot-subsystem-bench v1.0.0 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/polkadot/node/subsystem-bench)`
└─── dependencies
     ├─── "assert_matches"
     ├─── "clap-num"
     ├─── "jemalloc_pprof"
     ├─── "polkadot-node-core-chain-api"
     └─── "polkadot-service"
`polkadot-test-malus v1.0.0 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/polkadot/node/malus)`
└─── dev-dependencies
     └─── "polkadot-node-subsystem-test-helpers"
`polkadot-test-runtime v1.0.0 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/polkadot/runtime/test-runtime)`
└─── dev-dependencies
     ├─── "sp-keyring"
     └─── "tiny-keccak"
`polkadot-test-service v1.0.0 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/polkadot/node/test/service)`
└─── dev-dependencies
     └─── "substrate-test-utils"
`relay-utils v0.1.0 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/bridges/relays/utils)`
└─── dependencies
     └─── "console"
`rococo-parachain-runtime v0.6.0 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/cumulus/parachains/runtimes/testing/rococo-parachain)`
└─── dependencies
     └─── "testnet-parachains-constants"
`rococo-runtime v7.0.0 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/polkadot/runtime/rococo)`
├─── dependencies
│    ├─── "pallet-collective"
│    └─── "pallet-membership"
└─── dev-dependencies
     ├─── "separator"
     └─── "tiny-keccak"
`sc-client-api v28.0.0 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/substrate/client/api)`
└─── dev-dependencies
     └─── "sp-test-primitives"
`sc-client-db v0.35.0 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/substrate/client/db)`
└─── dev-dependencies
     └─── "quickcheck"
`sc-network v0.34.0 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/substrate/client/network)`
└─── dev-dependencies
     ├─── "sp-test-primitives"
     └─── "tokio-test"
`sc-network-common v0.33.0 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/substrate/client/network/common)`
├─── dependencies
│    ├─── "async-trait"
│    ├─── "libp2p-identity"
│    ├─── "sc-consensus"
│    ├─── "sc-network-types"
│    ├─── "sp-consensus"
│    └─── "sp-consensus-grandpa"
└─── dev-dependencies
     └─── "tempfile"
`sc-telemetry v15.0.0 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/substrate/client/telemetry)`
└─── dependencies
     └─── "sc-network"
`snowbridge-ethereum v0.3.0 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/bridges/snowbridge/primitives/ethereum)`
└─── dev-dependencies
     └─── "wasm-bindgen-test"
`snowbridge-pallet-ethereum-client v0.2.0 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/bridges/snowbridge/pallets/ethereum-client)`
└─── dev-dependencies
     └─── "sp-keyring"
`snowbridge-pallet-outbound-queue v0.2.0 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/bridges/snowbridge/pallets/outbound-queue)`
└─── dev-dependencies
     └─── "sp-keyring"
`snowbridge-pallet-system v0.2.0 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/bridges/snowbridge/pallets/system)`
└─── dev-dependencies
     └─── "sp-keyring"
`sp-api v26.0.0 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/substrate/primitives/api)`
└─── dev-dependencies
     └─── "sp-test-primitives"
`sp-api-test v2.0.1 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/substrate/primitives/api/test)`
└─── dependencies
     ├─── "rustversion"
     └─── "trybuild"
`sp-consensus v0.32.0 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/substrate/primitives/consensus/common)`
└─── dev-dependencies
     └─── "sp-test-primitives"
`sp-core v28.0.0 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/substrate/primitives/core)`
└─── dependencies
     └─── "k256"
`sp-runtime-interface v24.0.0 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/substrate/primitives/runtime-interface)`
└─── dev-dependencies
     ├─── "sp-core"
     ├─── "sp-io"
     ├─── "sp-runtime-interface-test-wasm"
     └─── "sp-state-machine"
`staging-node-cli v3.0.0-dev (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/substrate/bin/node/cli)`
└─── dev-dependencies
     └─── "platforms"
`staging-xcm-builder v7.0.0 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/polkadot/xcm/xcm-builder)`
└─── dev-dependencies
     └─── "assert_matches"
`substrate-frame-rpc-support v29.0.0 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/substrate/utils/frame/rpc/support)`
└─── dev-dependencies
     └─── "frame-system"
`substrate-test-client v2.0.1 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/substrate/test-utils/client)`
└─── dependencies
     └─── "sc-offchain"
`substrate-test-utils v4.0.0-dev (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/substrate/test-utils)`
├─── dependencies
│    ├─── "futures"
│    └─── "tokio"
└─── dev-dependencies
     ├─── "sc-service"
     └─── "trybuild"
`test-parachain-adder v1.0.0 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/polkadot/parachain/test-parachains/adder)`
└─── dependencies
     ├─── "dlmalloc"
     └─── "polkadot-parachain-primitives"
`test-parachain-adder-collator v1.0.0 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/polkadot/parachain/test-parachains/adder/collator)`
└─── dev-dependencies
     └─── "substrate-test-utils"
`test-parachain-undying v1.0.0 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/polkadot/parachain/test-parachains/undying)`
└─── dependencies
     ├─── "dlmalloc"
     └─── "polkadot-parachain-primitives"
`test-parachain-undying-collator v1.0.0 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/polkadot/parachain/test-parachains/undying/collator)`
└─── dev-dependencies
     └─── "substrate-test-utils"
`test-parachains v1.0.0 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/polkadot/parachain/test-parachains)`
├─── dependencies
│    ├─── "codec"
│    ├─── "test-parachain-adder"
│    ├─── "test-parachain-halt"
│    └─── "tiny-keccak"
└─── dev-dependencies
     └─── "sp-core"
`westend-runtime v7.0.0 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/polkadot/runtime/westend)`
├─── dependencies
│    ├─── "pallet-collective"
│    ├─── "pallet-democracy"
│    ├─── "pallet-elections-phragmen"
│    ├─── "pallet-membership"
│    ├─── "pallet-society"
│    └─── "pallet-state-trie-migration"
└─── dev-dependencies
     └─── "tiny-keccak"
`xcm-emulator v0.5.0 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/cumulus/xcm/xcm-emulator)`
└─── dependencies
     └─── "cumulus-pallet-xcmp-queue"
`xcm-runtime-apis v0.1.0 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/polkadot/xcm/xcm-runtime-apis)`
└─── dev-dependencies
     └─── "frame-executive"
`xcm-simulator-fuzzer v1.0.0 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/polkadot/xcm/xcm-simulator/fuzzer)`
└─── dependencies
     ├─── "frame-executive"
     ├─── "frame-try-runtime"
     └─── "honggfuzz"
`zombienet-backchannel v1.0.0 (/home/bkontur/cargo-remote-builds-aaa/4049172861662423200/polkadot/node/zombienet-backchannel)`
└─── dependencies
     └─── "reqwest"
Note: They might be false-positive.
      For example, `cargo-udeps` cannot detect usage of crates that are only used in doc-tests.
      To ignore some dependencies, write `package.metadata.cargo-udeps.ignore` in Cargo.toml.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C1-mentorA task where a mentor is available. Please indicate in the issue who the mentor could be.C2-good-first-issueA task for a first time contributor to become familiar with the Polkadot-SDK.dependenciesPull requests that update a dependency file

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions