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

Provide a deprecation mechanism based upon aliasing #58

Open
rvesse opened this issue Sep 27, 2016 · 0 comments
Open

Provide a deprecation mechanism based upon aliasing #58

rvesse opened this issue Sep 27, 2016 · 0 comments
Labels
annotations Java Annotations enhancement Proposed Enhancement/Feature
Milestone

Comments

@rvesse
Copy link
Owner

rvesse commented Sep 27, 2016

Command line interfaces often evolve over time. In my experience early releases often place all commands at the top level and as later releases happen commands get moved into groups in order to better organise them. However in terms of user experience this can often be a breaking change.

One way around this is to use the aliasing mechanism to redirect the old names to the new locations. However if you do this users are unaware that this is happening and so if you later decide to drop these aliases users still end up with a jarring transition.

A nicer way to handle this would be to provide a specific deprecation mechanism based upon aliasing. The idea of being that you could explicitly declare a deprecation. This will be automatically translated into a alias but with the added functionality that a warning message about the deprecation would be presented to users. Deprecation could also be declared such that a flag can be set to indicate whether a deprecation is a warning or an error. When set to error using a deprecated command name would result in a parsing failure.

Such a mechanism would allow people to release command name changes in a gradual manner. So the first release where a command name is changed you would mark the old name as deprecated with a redirection to new name and users would see appropriate warnings. In a subsequent release you could mark that deprecation as being in error and users would then be forced to adjust to the new name

@rvesse rvesse added the enhancement Proposed Enhancement/Feature label Sep 27, 2016
@rvesse rvesse added this to the Unscheduled milestone Sep 27, 2016
@rvesse rvesse added the annotations Java Annotations label Sep 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
annotations Java Annotations enhancement Proposed Enhancement/Feature
Projects
None yet
Development

No branches or pull requests

1 participant