-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Rename --pruning and --keep-blocks to be more similar to one another #11934
Rename --pruning and --keep-blocks to be more similar to one another #11934
Conversation
Is this backwards compatible? |
No |
Should it be? |
Yes, sounds like a good idea. We should rename the in code variable and add some alias for the old names. |
and emit a warning if the old versions are being used about potential deprecation, then in a few months time we can remove the old name entirely. |
I don't think that we can find out if they are being passed. Okay, we could probably do it but it would be very complicated. Clap wouldn't show the alises in the |
I added Now using both aliases the error message informs only for the new one: ➜ substrate ✗ ./target/release/substrate --dev --keep-blocks asfda
error: Invalid value "asfda" for '--blocks-pruning <COUNT>': invalid digit found in string
For more information try --help
➜ substrate ✗ ./target/release/substrate --dev --blocks-pruning asfda
error: Invalid value "asfda" for '--blocks-pruning <COUNT>': invalid digit found in string |
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 reasonable to me!
Thanks for keeping it backwards compatible
@wirednkod missing cumulus companion. |
Thank you @bkchr Done here |
bot merge |
…aritytech#11934) * rename prunning and keep-blocks flags * Add aliases in keep-blocks and pruning for backward compatibility * Rename in code variables from and to and
…aritytech#11934) * rename prunning and keep-blocks flags * Add aliases in keep-blocks and pruning for backward compatibility * Rename in code variables from and to and
This PR is renaming flags
--keep-blocks
and--prunning
to--blocks-pruning
and --state-prunning` accordingly. This makes the flags similar to each other and avoids confusion.Fixes #11907
polkadot companion: paritytech/polkadot#5863
cumulus companion: paritytech/cumulus#1514