Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

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

Closed
hirschenberger opened this issue Oct 6, 2021 · 2 comments · Fixed by #5966

Comments

@hirschenberger
Copy link
Contributor

hirschenberger commented Oct 6, 2021

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
Copy link
Contributor Author

hirschenberger commented Oct 6, 2021

It seems as if the building of all runtimes in runtime-benchmarks is added here:

runtime-benchmarks = [
"polkadot-runtime/runtime-benchmarks",
"kusama-runtime/runtime-benchmarks",
"westend-runtime/runtime-benchmarks",
"rococo-runtime/runtime-benchmarks"
]

This can in the future be solved with Cargo's weak dependency feature that is currently only available in nightly.

@nuke-web3 nuke-web3 changed the title Only building a subset of runtimes does not work. Only building a subset of runtimes does not work with runtime-benchmarks feautre enabled Oct 6, 2021
@hirschenberger hirschenberger changed the title Only building a subset of runtimes does not work with runtime-benchmarks feautre enabled Only building a subset of runtimes does not work with runtime-benchmarks feature enabled Oct 7, 2021
@gilescope
Copy link
Contributor

Weak dependency features has been stabilized in the 1.60 release.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants