-
Notifications
You must be signed in to change notification settings - Fork 719
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move Shelley commands to the top-lvl and deprecate "shelley" subcommand #2076
Conversation
a4661aa
to
7b8d432
Compare
We should also think about how we are going to update the cli tests. |
-- the provided 'ExceptT'. | ||
ioExceptTWithWarning :: MonadIO m => Text -> ExceptT e m () -> ExceptT e m () | ||
ioExceptTWithWarning warningMsg e = | ||
liftIO (Text.hPutStrLn stderr warningMsg) >> e |
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.
I personally wouldn't bother with defining two new functions, seems verbose when
liftIO (Text.hPutStrLn stderr warningMsg) >> e
on its own would do with a comment. Your call though!
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.
I was considering reusing this for other deprecated commands/arguments.
For example, after #1979 is merged, I'm considering whether we should print deprecation warnings when hex or TextEnvelope
keys are specified.
7b8d432
to
2eedb24
Compare
2eedb24
to
fc43c20
Compare
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.
LGTM!
bors merge |
2076: Move Shelley commands to the top-lvl and deprecate "shelley" subcommand r=dcoutts a=intricate This PR moves Shelley-related commands from under the "shelley" subcommand to the top-level of the CLI. We still maintain support for the "shelley" subcommand (i.e. all of the commands still work), but its help text is hidden. However, the help text can still be accessed by running `cardano-cli shelley` or `cardano-cli shelley --help`: ``` $ cardano-cli shelley Usage: cardano-cli shelley COMMAND Shelley specific commands (deprecated) Available options: -h,--help Show this help text Available commands: ... ``` Additionally, a warning message is written to `stderr` when one attempts to run a command under the "shelley" subcommand. Example: ``` $ cardano-cli shelley address key-gen --verification-key-file /dev/null --signing-key-file /dev/null WARNING: The "shelley" subcommand is now deprecated and will be removed in the future. Please use the top-level commands instead. ``` Co-authored-by: Luke Nadur <[email protected]>
Timed out. |
bors r+ |
Build succeeded: |
This PR moves Shelley-related commands from under the "shelley" subcommand to the top-level of the CLI.
We still maintain support for the "shelley" subcommand (i.e. all of the commands still work), but its help text is hidden. However, the help text can still be accessed by running
cardano-cli shelley
orcardano-cli shelley --help
:Additionally, a warning message is written to
stderr
when one attempts to run a command under the "shelley" subcommand. Example: