Skip to content
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

Fixes #16161 - option deprecation indication in help #212

Merged
merged 3 commits into from
Aug 22, 2016

Conversation

tstrachota
Copy link
Member

No description provided.

@iNecas
Copy link
Member

iNecas commented Aug 18, 2016

When testing with theforeman/hammer-cli-foreman#256, I would expect also to see what to use instead (the string of :deprecated, warning)

@tstrachota
Copy link
Member Author

I updated the code to print the message when the whole option (with all switch aliases) is deprecated.

@mbacovsky is the partial deprecation of certain switches used anywhere? It feels quite unnatural.

@mbacovsky
Copy link
Member

@tstrachota, the partial deprecation is used when we wanted to rename certain options and wanted to keep compatibility with previous version. Alias with old name that was deprecated solved that. It was used downstream only. But still can be useful feature of the option builder.

It makes sense to show deprecated only for fully deprecated options but theoretically option ['--opt'], :deprecated => "message" and option ['--opt'], :deprecated => {'--opt' => "message"} are semantically same. You could print something like --opt, --old-opt description (--old-opt is deprecated) for options with :deprecated being hash

@tstrachota
Copy link
Member Author

@mbacovsky makes sense, updated.

@mbacovsky
Copy link
Member

Works great now, thanks @tstrachota! 🍏
👍

@mbacovsky mbacovsky merged commit f6bdfc9 into theforeman:master Aug 22, 2016
@tstrachota tstrachota deleted the deprecation branch May 17, 2017 07:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants