Closed rkrisztian closed 3 years ago
BTW, wasSuccessful
is the grammatically correct spelling, but I do not intend to annoy you. :)
Thanks for the well described issue, just got back from vacation and catching up with everything.
To summarise the ask(s):
Path
supported by default type converterswasSuccessfull()
(I know my spelling is often questionable and a weird mix of British/American english)withParser()
The first two are obvious to me but not so sure on the 3rd point. I guess you are referring to the point that once you have dropped into the parser builder you can't get back out to the parent builder. This is definitely possible in other parts of the Fluent API but not here so can certainly be improved in the future.
This is fixed for the forthcoming 2.9.0 release, you can test out the fixes now by using 2.9.0-SNAPSHOT
which is available from the Sonatype OSS repository per https://central.sonatype.org/publish/publish-guide/#accessing-repositories
Changes made to address this issue:
Path
conversion added to DefaultTypeConverter
so supported by defaultwithParser()
on a CliBuilder
you will now be able to call parent()
on the resulting ParserBuilder
to return control to the parent CliBuilder
ConvertResult
now has a correctly spelled wasSuccessful()
method with the old method deprecated
For conversion of parameters to
Path
, currently I have to add a custom converter class like this:It would be nice if this could be supported by default, as
File
is already supported.Note: not urgent, for now I can just add this to my code:
Note: I am probably not on the latest version yet, but if this inconveniently fluent-style-breaker
withParser
method has not been improved yet, please also consider making it more fluent too.