github remkop/picocli v3.0.0-alpha-5
picocli 3.0.0-alpha-5

latest releases: v4.7.6, v4.7.5, v4.7.4...
6 years ago

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 and PositionalParamSpec.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() to ArgSpec.stringValues().
  • [#342] API Change: Prefix ParseResult methods with matched if they return only matched options/positionals.
  • [#340] API Change: Rename ParseResult.optionValue(String, T) to matchedOptionValue(String, T).
  • [#338] API Change: Remove ParseResult.rawOptionValue(s) and rawPositionalValue(s) methods.
  • [#339] API Change: Remove ParseResult.matchedOptionValue(OptionSpec) and matchedPositionalValue(PositionalParamSpec) methods.
  • [#347] API Change: Make ArgSpec.getValue, setValue and isMultiValue 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's stringValues list before parsing new input.
  • [#335] Bugfix: Abstract class ArgSpec should not implement equals and hashCode.
  • [#345] Bugfix: Stop processing varargs when cumulative size reached.

Deprecations

See 3.0.0-alpha-1

Potential breaking changes

  • Renamed ArgSpec.rawStringValues() to ArgSpec.stringValues().
  • Renamed ParseResult methods with matched if they return only matched options/positionals:
    • options to matchedOptions
    • positionalParams to matchedPositionals
    • option(char), option(String) to matchedOption
    • positional(int) to matchedPositional
    • hasOption(char), hasOption(String), hasOption(OptionSpec) to hasMatchedOption
    • hasPositional(int), hasPositional(PositionalParamSpec) to hasMatchedPositional
  • Renamed ParseResult.optionValue(String, T) to matchedOptionValue(String, T), and positionalValue to matchedPositionalValue.
  • Removed ParseResult::rawOptionValue(s) and rawPositionalValue(s) methods.
  • Removed ParseResult.matchedOptionValue(OptionSpec) and matchedPositionalValue(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.

Don't miss a new picocli release

NewReleases is sending notifications on new releases.