polkadot icon indicating copy to clipboard operation
polkadot copied to clipboard

Only building a subset of runtimes does not work with `runtime-benchmarks` feature enabled

Open hirschenberger opened this issue 4 years ago • 2 comments

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

hirschenberger avatar Oct 06 '21 05:10 hirschenberger

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.

hirschenberger avatar Oct 06 '21 13:10 hirschenberger

Weak dependency features has been stabilized in the 1.60 release.

gilescope avatar Jul 04 '22 16:07 gilescope