github remkop/picocli v3.0.0-beta-1
picocli 3.0.0-beta-1

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

Picocli 3.0.0-beta-1

The picocli community is pleased to announce picocli 3.0.0-beta-1.

This release contains enhancements and bug fixes.

This is the twenty-seventh public release.
Picocli follows semantic versioning.

Table of Contents

  • New and noteworthy
  • Promoted features
  • Fixed issues
  • Deprecations
  • Potential breaking changes

New and Noteworthy

Previously, the usage message layout had a fixed width long option name column: this column is always 24 characters, even if none of the options have a long option name.

This gives weird-looking usage help messages in some cases. For example:

@Command(name="ls")
class App {
    @Option(names = "-a", description = "display all files") boolean a;
    @Option(names = "-l", description = "use a long listing format") boolean l;
    @Option(names = "-t", description = "sort by modification time") boolean t;
}

The usage message for this example was:

Usage: ls [-alt]
  -a                          display all files
  -l                          use a long listing format
  -t                          sort by modification time

From this release, picocli adjusts the width of the long option name column to the longest name (max 24).

The new usage message for this example looks like this:

Usage: ls [-alt]
  -a     display all files
  -l     use a long listing format
  -t     sort by modification time

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

  • [#364] API Change: Remove parser option arityRestrictsCumulativeSize.
  • [#355] API Change: Add method ArgSpec.hasInitialValue.
  • [#361] API Change: Add parser option aritySatisfiedByAttachedOptionParam for commons-cli compatibility.
  • [#363] API Change: Add parser option to limit the number of parts when splitting to max arity, for compatibility with commons-cli.
  • [#360] Enhancement: Dynamically adjust width of long option name column (up to max 24).

Deprecations

Potential breaking changes

  • The usage message format changed: it now dynamically adjusts the width of the long option name column. This may break tests.
  • API Change: Removed parser option arityRestrictsCumulativeSize introduced in 3.0.0-alpha-3.

Don't miss a new picocli release

NewReleases is sending notifications on new releases.