Picocli 3.0.0-alpha-5
The picocli community is pleased to announce picocli 3.0.0-alpha-5.
This release contains enhancements and bug fixes.
This is the twenty-fifth public release.
Picocli follows semantic versioning.
Table of Contents
- New and noteworthy
- Promoted features
- Fixed issues
- Deprecations
- Potential breaking changes
New and Noteworthy
Promoted Features
Promoted features are features that were incubating in previous versions of picocli but are now supported and subject to backwards compatibility.
No features have been promoted in this picocli release.
Fixed issues
- [#329] New API: Add parser configuration to control whether boolean flags should be toggled.
- [#328] New API: Provide getter methods on
OptionSpec.Builder
andPositionalParamSpec.Builder
. - [#326] New API: Add parser configuration to treat unmatched options as positional parameters.
- [#283] New API: Provide
getMissing
method on MissingParameterException to get a reference to the problematic options and positional parameters. Thanks to jcapsule for the suggestion. - [#334] API Change: Rename
ArgSpec.rawStringValues()
toArgSpec.stringValues()
. - [#342] API Change: Prefix ParseResult methods with
matched
if they return only matched options/positionals. - [#340] API Change: Rename
ParseResult.optionValue(String, T)
tomatchedOptionValue(String, T)
. - [#338] API Change: Remove
ParseResult.rawOptionValue(s)
andrawPositionalValue(s)
methods. - [#339] API Change: Remove
ParseResult.matchedOptionValue(OptionSpec)
andmatchedPositionalValue(PositionalParamSpec)
methods. - [#347] API Change: Make
ArgSpec.getValue
,setValue
andisMultiValue
public methods. - [#333] Enhancement: Added subcommand to synopsis in generated usage help. Thanks to jcapsule for the pull request.
- [#323] Enhancement: Remove dependency on java.sql package: picocli should only require the java.base module when running in Java 9.
- [#325] Enhancement: Allow custom type converter to map empty String to custom default value for empty options. Thanks to jesselong for the suggestion.
- [#303] Enhancement: Improve validation to prevent common mistakes.
- [#70] Enhancement: Positional parameters should only consume values where type conversion succeeds.
- [#346] Enhancement: Validate that arity min is never greater than max.
- [#348] Enhancement: Interpreter should call
ArgSpec.setValue
for every matched option or positional parameter. - [#327] Bugfix: Default values should not cause options and positional parameters to be added to ParseResult.
- [#330] Bugfix:
Interpreter
should clear option's and positional parameter'sstringValues
list before parsing new input. - [#335] Bugfix: Abstract class
ArgSpec
should not implementequals
andhashCode
. - [#345] Bugfix: Stop processing varargs when cumulative size reached.
Deprecations
See 3.0.0-alpha-1
Potential breaking changes
- Renamed
ArgSpec.rawStringValues()
toArgSpec.stringValues()
. - Renamed
ParseResult
methods withmatched
if they return only matched options/positionals:options
tomatchedOptions
positionalParams
tomatchedPositionals
option(char)
,option(String)
tomatchedOption
positional(int)
tomatchedPositional
hasOption(char)
,hasOption(String)
,hasOption(OptionSpec)
tohasMatchedOption
hasPositional(int)
,hasPositional(PositionalParamSpec)
tohasMatchedPositional
- Renamed
ParseResult.optionValue(String, T)
tomatchedOptionValue(String, T)
, andpositionalValue
tomatchedPositionalValue
. - Removed
ParseResult::rawOptionValue(s)
andrawPositionalValue(s)
methods. - Removed
ParseResult.matchedOptionValue(OptionSpec)
andmatchedPositionalValue(PositionalParamSpec)
methods.
See also breaking changes for
3.0.0-alpha-4, 3.0.0-alpha-3, 3.0.0-alpha-2, and 3.0.0-alpha-1.