-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Conversation
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
@ggwpez you made a tool? share the link! |
|
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
std
features to Cargo filesstd
features to Cargo files
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
fyi there is progress being made on cargo fmt Cargo.toml. Very much still top of my xmas list this year: rust-lang/rustfmt#5240 |
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
The CI pipeline was cancelled due to failure one of the required jobs. |
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't look closely, but based on the description it all looks very good.
I have a similar request as well. If I create a new pallet now, and it has try-runtime
feature, if I add it to a runtime and forgot to enable try-runtime
, no normal compilation will work, but the try-runtime build will fail. Can you check for this as well? You can see a few instances of it in the diff of this PR: https://github.com/paritytech/substrate/pull/10174/files
@@ -116,6 +116,13 @@ substrate-wasm-builder = { version = "5.0.0-dev", path = "../../../utils/wasm-bu | |||
default = ["std"] | |||
with-tracing = ["frame-executive/with-tracing"] | |||
std = [ | |||
"sp-sandbox/std", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can just remove the unused depedency, then we don't need to add it here :P
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There also is cargo udeps which claims to find unused crates.
I will give it a try later.
Something makes the bench regression guard fail, maybe this? Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
This reverts commit f2cddfe. Was already fixed, only needed a CI retry. Signed-off-by: Oliver Tale-Yazdi <[email protected]>
bot merge |
* Add std feature Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Fix features Signed-off-by: Oliver Tale-Yazdi <[email protected]> * WIP Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Fix features Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Fmt Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Fix features Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Cleanup Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Impl function also in tests Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Make compile Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Fix sp-trie feature Something makes the bench regression guard fail, maybe this? Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Add runtime-benchmarks feature to sc-service Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Revert "Fix sp-trie feature" This reverts commit f2cddfe. Was already fixed, only needed a CI retry. Signed-off-by: Oliver Tale-Yazdi <[email protected]> Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Problems & Fixes
Some crates do not compile on their own
Try
cargo c -p pallet-alliance --features runtime-benchmarks
, which does not work on Substrate master.The fix is to always enable the std features of all non-optional dependencies that have a std feature.
There is no regression script provided by me but it could be done. Currently I am using scripts
to compile each crate on its own to see that they work with different feature sets.
runtime-benchmarks
is enabled per defaultTry
cargo tree -e features | grep runtime-benchmarks
to see which crates have the feature enabledalthough
--features runtime-benchmarks
was never provided.This comes from crates either: carelessly enabling it, or crates enabling it per default.
Fixed by checking the deps tree ensuring that it is never enabled per default.
I wrote a regression script which wraps that
cargo tree
command and can be in-cooperated into theCI in a future MR.
pallet-bags-list-fuzzer requires
runtime-benchmarks
Fixed by creating a dedicated
fuzz
feature which gates the required functions.Polkadot companion: paritytech/polkadot#5983
Cumulus companion: paritytech/cumulus#1607