Picocli 3.0.0-beta-2
The picocli community is pleased to announce picocli 3.0.0-beta-2.
This release contains enhancements and bug fixes.
This is the twenty-eighth public release.
Picocli follows semantic versioning.
Table of Contents
- New and noteworthy
- Promoted features
- Fixed issues
- Deprecations
- Potential breaking changes
New and Noteworthy
Stricter Arity Validation
Until this release, options with mandatory parameters would consume as many arguments as required, even if those arguments matched other option flags. For example:
Given a command like this:
class App {
@Option(names = "-a", arity = "2")
String[] a;
@Option(names = "-v")
boolean v;
}
Prior to this change, the following input would be accepted:
<command> -a 1 -v
In previous versions, picocli accepted this and assigned "1"
and "-v"
as the two values for the -a
option.
From this release, the parser notices that one of the arguments is an option and throws a MissingParameterException
because not enough parameters were specified for the first option.
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
- [#366] API Change: Add
ArgSpec.getTypedValues()
method. - [#365] Enhancement: Stricter arity validation: options with mandatory parameters no longer consume other option flags.
- [#357] Enhancement: Improve synopsis format. Be more succinct when
limitSplit
is true. Support repeating groups.
Deprecations
This release has no deprecations.
Potential breaking changes
- Stricter arity validation may break existing applications that intentionally consume arguments regardless of whether arguments are other options.