polkadot
polkadot copied to clipboard
Only building a subset of runtimes does not work with `runtime-benchmarks` feature enabled
Building the runtimes takes a long time. I tried to build just one runtime for benchmark development, but couldn't figure out how to build only the runtime I wanted to benchmark.
I tried cargo build --release --no-default-features --features="runtime-benchmarks","polkadot-cli/kusama-native" but this still builds all runtimes. Maybe they are opted in by the runtime-benchmarks feature?
Related matrix discussion
It seems as if the building of all runtimes in runtime-benchmarks is added here:
https://github.com/paritytech/polkadot/blob/c4ee9d463adccfa3bf436433e3e26d0de5a4abbc/node/service/Cargo.toml#L160-L165
This can in the future be solved with Cargo's weak dependency feature that is currently only available in nightly.
Weak dependency features has been stabilized in the 1.60 release.