-
Notifications
You must be signed in to change notification settings - Fork 204
Fix issue with groups not being reported in help output. #411
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
Fix issue with groups not being reported in help output. #411
Conversation
AbstractHelpFormatter: * Swapped printHelp using Iterable<Option> with printHelp using Options. Effectively switching to using Options class to print the help. * Removed public String toSyntaxOptions(final Iterable<Option> options) as it was added in this version and should have only been used internally. HelpFormatterTest: * removed toSyntaxOptions using Iterable<Option> test. * added a printHelpTest with Iterable<Option> as previously we depended on printHelpTest with Option to test the code branch. * added verifyOptionGroupingOutput as a test to show that reported issue is corrected.
|
@garydgregory I removed a method that was added in 1.10.0 This caused the build to fail. I can put it back if that is what we need to do. But we should mark it as as do not use. In addition, there is no jira ticket for this as none was created to go with the reported issue. I can create one if you wish. I did not as I was not sure how you wanted to handle this and because I am pressed for time and I wanted to at least get the fix in front of your eyes ASAP. |
|
Hi @Claudenw Thank you for the PR :) You CANNOT break binary compatibility within a major release line. I've added back |
Add test for toSyntaxOptions with iterable of options
|
@garydgregory just for my clarification, when does the inclusion of a new method become part of the binary compatibility? If a method was added in 1.10.0-SNAPSHOT can it not be removed before 1.10.0 is released? The method in question was added in 1.10.0-SNAPSHOT and I thought this was 1.10.0 that we are working on. Hence my confusion. Please clarify for my edification. |
|
Hi @Claudenw We are both right 😉
Yes, but version 1.10.0 was released in September this year. We are now on 1.11.0-SNAPSHOT. |
|
2 comments. DOH! and I think this should be versioned as 1.10.1 unless there are other changes. |
|
Hello @Claudenw |
|
Thank you @Claudenw , merged! |
AbstractHelpFormatter:
Swapped printHelp using Iterable with printHelp using Options. Effectively switching to using Options class to print the help.
Removed public String toSyntaxOptions(final Iterable options) as it was added in this version and should have only been used internally.
HelpFormatterTest:
removed toSyntaxOptions using Iterable test.
added a printHelpTest with Iterable as previously we depended on printHelpTest with Option to test the code branch.
added verifyOptionGroupingOutput as a test to show that reported issue is corrected.
Thanks for your contribution to Apache Commons! Your help is appreciated!
Before you push a pull request, review this list:
mvn; that'smvnon the command line by itself.