-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Conversation
zepter lint propagate-feature --feature try-runtime --left-side-feature-missing=ignore --workspace --fix --feature-enables-dep="try-runtime:frame-try-runtime" zepter lint propagate-feature --feature runtime-benchmarks --left-side-feature-missing=ignore --workspace --fix --feature-enables-dep="runtime-benchmarks:frame-benchmarking" zepter lint propagate-feature --feature std --left-side-feature-missing=ignore --workspace --fix Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
This reverts commit cf4ff6c.
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
This reverts commit 5daa06a.
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
This reverts commit ca15de5.
Could we use Zepter to a little bit of toml formatting too? For example organizing dependencies alphabetically? |
Yes we definitely can. Currently the autofixer is written to not re-order anything, but it already has to touch the toml array, so it could be ordered as well. |
Could we make it so that they're not lost? (I assume there are |
Oh, the official |
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
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.
Looks good besides the edge case around enabling of a crate and a feature in one go that I highlighted in the review
Co-authored-by: Bastian Köcher <git@kchr.de>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
bot merge |
cargo-featalign can address many of the situations mentioned in this thread such as preseving comments. Recently, I added support for sorting features alphabetically based on @shawntabrizi's comment. However, I am unsure about how parity CI functions. I am eager to apply this tool to Substrate. cc @ggwpez |
@AurevoirXavier you can check out the diff in |
it would be great if these feature fix stuff was somehow integrated into the node-template, cumulus, and similar projects. Then users would run something like |
Trying to automatically fix
std
,runtime-benchmarks
andtry-runtime
features withThe auto-fixer tries to be as non-invasive as possible, but removes empty lines.
Explanation:
left-side-feature-missing
is passed. To be really correct I think we would have to add it to all crates that do not have it though.feature-enables-dep
will enable the given dependency as non-optional when the feature is enabled. Otherwise the features of optional dependencies will also be enabled as optional.Known blindspot: The
--workspace
flag currently requires that both sides are in the workspace. This will be extended soon to also allow the right-hand-side dependency to be outside of the worspace. Since currently it does not detectserde/std
as missing when the--workspace
flag is present.TODO:
featalign
to double-check (will maybe do as follow up so we already have something working).