Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): update dependency info.picocli:picocli to v3.9.6 #496

Open
wants to merge 1 commit into
base: 7.0.x
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Sep 24, 2024

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
info.picocli:picocli (source) 3.8.0 -> 3.9.6 age adoption passing confidence

Release Notes

remkop/picocli (info.picocli:picocli)

v3.9.6

The picocli community is pleased to announce picocli 3.9.6.

This release improves support for interactive (password) options:

  • interactive options can now use type char[] instead of String, to allow applications to null out the array after use so that sensitive information is no longer resident in memory
  • interactive options can be optionally interactive if configured with arity = "0..1"

This is the fifty-second public release.
Picocli follows semantic versioning.

Table of Contents

New and Noteworthy

This release improves support for interactive (password) options:

  • interactive options can now use type char[] instead of String, to allow applications to null out the array after use so that sensitive information is no longer resident in memory
  • interactive options can be optionally interactive if configured with arity = "0..1"

For example, if an application has these options:

@​Option(names = "--user")
String user;

@​Option(names = "--password", arity = "0..1", interactive = true)
char[] password;

With the following input, the password field will be initialized to "123" without prompting the user for input:

--password 123 --user Joe

However, if the password is not specified, the user will be prompted to enter a value. In the following example, the password option has no parameter, so the user will be prompted to type in a value on the console:

--password --user Joe

Fixed issues

Deprecations

No features were deprecated in this release.

Potential breaking changes

This release has no breaking changes.

v3.9.5

The picocli community is pleased to announce picocli 3.9.5.

This release contains a critical workaround to protect against JVM crashes when running on RedHat Linux 3.10.0-327.44.2.el7.x86_64.

Picocli 3.9.0 introduced a change in the heuristics for emitting ANSI escape characters. As part of this change, picocli may load the org.fusesource.jansi.AnsiConsole class from the JAnsi library when not running on Windows. This may crash the JVM (see fusesource/jansi-native#17).

The workaround in this release is to only load the AnsiConsole class when running on Windows.

Users using 3.9.0 and higher are strongly recommended to upgrade to 3.9.5 or later.

This is the fiftieth public release.
Picocli follows semantic versioning.

Table of Contents

New and Noteworthy

Fixed issues

  • [#​630] Avoid loading org.fusesource.jansi.AnsiConsole when not running on Windows to avoid JVM crashes on non-Windows platforms.
  • [#​632] ReflectionConfigGenerator now specifies the allowWrite = true attribute for final fields.

Deprecations

No features were deprecated in this release.

Potential breaking changes

This release has no breaking changes.

v3.9.4

The picocli community is pleased to announce picocli 3.9.4.

This release contains bugfixes and enhancements.

From this release, enum-typed options and positional parameters that are multi-value can be stored in EnumSet collections (in addition to other Collections, arrays and Maps).

Also, a better error message is now shown when unknown options are encountered while processing clustered short options. The new error message includes both the failing part and the original command line argument.

Bugfixes:

  • ReflectionConfigGenerator incorrectly listed superclass fields as fields of the concrete subclass, causing "GraalVM error: Error parsing reflection configuration in json" when creating a native image.
  • Method subcommands in commands that subclass another command caused InitializationException.

This is the forty-ninth public release.
Picocli follows semantic versioning.

Table of Contents

New and Noteworthy

Fixed issues

  • [#​628] Add support for collecting enum multi-value options and positional parameters in EnumSet<> collections. Thanks to Lee Atkinson for raising this.
  • [#​619] Bugfix: Method subcommands in commands that subclass another command caused InitializationException: "Another subcommand named 'method' already exists...". Thanks to PorygonZRocks for the bug report.
  • [#​622] Bugfix: ReflectionConfigGenerator incorrectly listed superclass fields as fields of the concrete subclass, causing "GraalVM error: Error parsing reflection configuration in json". Thanks to Sebastian Thomschke for the bug report.
  • [#​623] ReflectionConfigGenerator now generates json in alphabetic order.
  • [#​627] Improve error message for unknown options when processing clustered short options.

Deprecations

No features were deprecated in this release.

Potential breaking changes

This release has no breaking changes.

v3.9.3

The picocli community is pleased to announce picocli 3.9.3.

This release contains bugfixes and enhancements.

This is the forty-eight public release.
Picocli follows semantic versioning.

Table of Contents

New and Noteworthy

Fixed issues

  • [#​613] Enhancement: Improve picocli heuristics for unmatched options: single-character arguments that don't exactly match options (like -) should be considered positional parameters. Thanks to Oliver Weiler for the bug report.
  • [#​615] Bugfix: Opaque stacktrace for "%" in Option description. Thanks to petermr for the bug report.
  • [#​616] Bugfix: showDefaultValues=true with defaultValueProvider did not render defaultValues in usage help. Thanks to Sebastian Thomschke for the bug report.

Deprecations

No features were deprecated in this release.

Potential breaking changes

This release has no breaking changes.

v3.9.2

The picocli community is pleased to announce picocli 3.9.2.

This release contains bugfixes and enhancements.

Picocli now has a mailing list picocli at googlegroups dot com. Alternatively visit the picocli Google group web interface.

The user manual has improved documentation for internationalization and localization, and the section on Dependency Injection now has a Spring Boot example and link to the Micronaut user manual.

Bugfixes: AutoComplete now uses the specified IFactory correctly for CommandLine; defaulting usageHelp or versionHelp options no longer prevents validation of required options; and usage help for booleans options with arity = "1" now correctly show the option parameter in the synopsis.

Many thanks to the many members of the picocli community who contributed pull requests, bug reports and participated in discussions!

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

Table of Contents

New and Noteworthy

Picocli now has a mailing list picocli at googlegroups dot com. Alternatively visit the picocli Google group web interface.

The user manual has improved documentation for internationalization and localization. Dependency Injection is now a top-level section and now has a Spring Boot example and link to the Micronaut user manual.

Fixed issues

  • [#​602] Make CommandLine in AutoComplete use correct IFactory implementation. Thanks to Mikołaj Krzyżanowski for the pull request.
  • [#​608] Bugfix: defaulting usageHelp or versionHelp options incorrectly prevented validation of required options and positional parameters. Thanks to Pietro Braione for the bug report.
  • [#​612] Bugfix: Usage help for booleans options with arity = "1" now correctly show the option parameter in synopsis. Thanks to prewersk for the bug report.
  • [#​606] Doc: Added subcommand example. Thanks to Andreas Deininger for the pull request.
  • [#​605] Doc: Improved documentation for internationalization and localization. Thanks to Andreas Deininger for raising this.
  • [#​604] Doc: Improve user manual section on Dependency Injection: add Spring Boot example. Thanks to Alistair Rutherford for the example code.
  • [#​610] Build: add JDKs to Travis CI build.
  • [#​609] Created mailing list picocli at googlegroups dot com: picocli Google group.

Deprecations

No features were deprecated in this release.

Potential breaking changes

This release has no breaking changes.

v3.9.1

The picocli community is pleased to announce picocli 3.9.1.

The picocli.AutoComplete application no longer calls System.exit() unless requested by setting system property picocli.autocomplete.systemExitOnError or picocli.autocomplete.systemExitOnSuccess to any value other than false. Applications that rely on the exit codes introduced in picocli 3.9.0 need to set these system properties.

This release adds support for quoted map keys with embedded '=' characters.

This release contains bugfixes and enhancements.

This is the forty-sixth public release.
Picocli follows semantic versioning.

Table of Contents

New and Noteworthy

Fixed issues

  • [#​592] Error message now shows enum constant names, not toString() values, after value mismatch. Thanks to startewho for the bug report.
  • [#​591] Replace some String concatenation in picocli.AutoComplete with StringBuilder. Thanks to Sergio Escalante for the pull request.
  • [#​594] Add support for quoted map keys with embedded '=' characters. Thanks to Pubudu Fernando for the suggestion.
  • [#​596] picocli.AutoComplete should not call System.exit() unless requested. Thanks to Markus Heiden, Bob Tiernay and RobertZenz for analysis and ideas contributing to the solution.
  • [#​593] Use Gradle Bintray Plugin to publish artifacts to Bintray.

Deprecations

No features were deprecated in this release.

Potential breaking changes

The picocli.AutoComplete application no longer calls System.exit() unless requested by setting system property picocli.autocomplete.systemExitOnError or picocli.autocomplete.systemExitOnSuccess to any value other than false.
Applications that rely on the exit codes introduced in picocli 3.9.0 need to set these system properties.

The new support for quoted map keys with embedded '=' characters [#​594] may impact some existing applications.
If CommandLine::setTrimQuotes() is set to true, quotes are now removed from map keys and map values. This did not use to be the case.

For example:

class App {
    @&#8203;Option(names = "-p") Map<String, String> map;
}

When CommandLine::setTrimQuotes() was set to true, given input like the below:

-p AppOptions="-Da=b -Dx=y"

The above used to result in a map with key AppOptions and value "-Da=b -Dx=y" (including the quotes), but the same program and input now results in a map with key AppOptions and value -Da=b -Dx=y (without quotes).

Also, when CommandLine::setTrimQuotes() is false (the default), input like the below will now cause a ParameterException ("value should be in KEY=VALUE format"):

-p "AppOptions=-Da=b -Dx=y"

Prior to this release, the above was silently ignored (no errors but also no key-value pairs in the resulting map).

v3.9.0

The picocli community is pleased to announce picocli 3.9.0.

This release contains bugfixes and enhancements in the main picocli module, and adds a new module: picocli-shell-jline3.

The new module Picocli Shell JLine3 (picocli-shell-jline3) contains components and documentation for building
interactive shell command line applications with JLine 3 and picocli.

This release contains API enhancements to allow customization of the usage help message:

  • help section renderers can be added, replaced or removed
  • help section keys to reorder sections in the usage help message
  • help factory to create custom Help instances
  • option order attribute to reorder options in the usage help message option list

This release also has improved heuristics to decide whether ANSI escape codes should be emitted or not.

The simplified @​-file (argument file) format is now fully compatible with JCommander: empty lines are ignored and comments may start with leading whitespace.

The picocli.Autocompletion application now accepts a parameter specifying a custom factory, and returns a non-zero exit code on error, to facilitate incorporating it into the build.

Bug fixes in this release:

  • @Command method options and positional parameter values are now cleared correctly when reusing a CommandLine instance
  • the default exception handler now correctly respects the exit code for all exceptions

Finally, this release improves internal quality and robustness by increasing the test code coverage. About 300 tests were added to bring the total to 1300+ tests. This improved line coverage to 98% (was 88%) and complexity coverage to 98% (was 82%).

This is the forty-fifth public release.
Picocli follows semantic versioning.

Table of Contents

New and Noteworthy

Help Section Renderer API

This release introduces new API to facilitate customizing the usage help message: IHelpFactory allows applications to plug in Help subclasses, and IHelpSectionRenderer allows applications to add custom sections to the usage help message, or redefine existing sections.

The usage help message is no longer hard-coded, but is now constructed from the section renderers defined in CommandLine::getHelpSectionMap (or UsageMessageSpec::sectionMap for a single CommandSpec).

By default this map contains the predefined section renderers:

// The default section renderers delegate to methods in Help for their implementation
// (using Java 8 lambda notation for brevity):
Map<String, IHelpSectionRenderer> map = new HashMap<>();
map.put(SECTION_KEY_HEADER_HEADING,         help -> help.headerHeading());
map.put(SECTION_KEY_HEADER,                 help -> help.header());

//e.g. Usage:
map.put(SECTION_KEY_SYNOPSIS_HEADING,       help -> help.synopsisHeading());

//e.g. <cmd> [OPTIONS] <subcmd> [COMMAND-OPTIONS] [ARGUMENTS]
map.put(SECTION_KEY_SYNOPSIS,               help -> help.synopsis(help.synopsisHeadingLength()));

//e.g. %nDescription:%n%n
map.put(SECTION_KEY_DESCRIPTION_HEADING,    help -> help.descriptionHeading());

//e.g. {"Converts foos to bars.", "Use options to control conversion mode."}
map.put(SECTION_KEY_DESCRIPTION,            help -> help.description());

//e.g. %nPositional parameters:%n%n
map.put(SECTION_KEY_PARAMETER_LIST_HEADING, help -> help.parameterListHeading());

//e.g. [FILE...] the files to convert
map.put(SECTION_KEY_PARAMETER_LIST,         help -> help.parameterList());

//e.g. %nOptions:%n%n
map.put(SECTION_KEY_OPTION_LIST_HEADING,    help -> help.optionListHeading());

//e.g. -h, --help   displays this help and exits
map.put(SECTION_KEY_OPTION_LIST,            help -> help.optionList());

//e.g. %nCommands:%n%n
map.put(SECTION_KEY_COMMAND_LIST_HEADING,   help -> help.commandListHeading());

//e.g.    add       adds the frup to the frooble
map.put(SECTION_KEY_COMMAND_LIST,           help -> help.commandList());
map.put(SECTION_KEY_FOOTER_HEADING,         help -> help.footerHeading());
map.put(SECTION_KEY_FOOTER,                 help -> help.footer());

Applications can add, remove or replace sections in this map. The CommandLine::getHelpSectionKeys method (or UsageMessageSpec::sectionKeys for a single CommandSpec) returns the section keys in the order that the usage help message should render the sections. The default keys are (in order):

  1. SECTION_KEY_HEADER_HEADING
  2. SECTION_KEY_HEADER
  3. SECTION_KEY_SYNOPSIS_HEADING
  4. SECTION_KEY_SYNOPSIS
  5. SECTION_KEY_DESCRIPTION_HEADING
  6. SECTION_KEY_DESCRIPTION
  7. SECTION_KEY_PARAMETER_LIST_HEADING
  8. SECTION_KEY_PARAMETER_LIST
  9. SECTION_KEY_OPTION_LIST_HEADING
  10. SECTION_KEY_OPTION_LIST
  11. SECTION_KEY_COMMAND_LIST_HEADING
  12. SECTION_KEY_COMMAND_LIST
  13. SECTION_KEY_FOOTER_HEADING
  14. SECTION_KEY_FOOTER

This ordering may be modified with the CommandLine::setHelpSectionKeys setter method (or UsageMessageSpec::sectionKeys(List) for a single CommandSpec).

Option order Attribute

Options are sorted alphabetically by default, but this can be switched off by specifying @Command(sortOptions = false) on the command declaration. This displays options in the order they are declared.

However, when mixing @Option methods and @Option fields, options do not reliably appear in declaration order.

The @Option(order = <int>) attribute can be used to explicitly control the position in the usage help message at which the option should be shown. Options with a lower number are shown before options with a higher number.

New Module picocli-shell-jline3

Picocli Shell JLine3 contains components and documentation for building interactive shell command line applications with JLine 3 and picocli.

This release contains the picocli.shell.jline3.PicocliJLineCompleter class.
PicocliJLineCompleter is a small component that generates completion candidates to allow users to get command line TAB auto-completion for a picocli-based application running in a JLine 3 shell.
It is similar to the class with the same name in the picocli.shell.jline2 package in the picocli-shell-jline2 module.

See the module's README for more details.

Improved ANSI Heuristics

This release has improved heuristics to decide whether ANSI escape codes should be emitted or not.

Support was added for the following environment variables to control enabling ANSI:

Fixed issues

  • [#​574] Add picocli-shell-jline3 module. Thanks to mattirn for the pull request.
  • [#​587] Enhance picocli-shell-jline3 example by using JLine's DefaultParser to split lines into arguments. Thanks to mattirn for the pull request.
  • [#​567] Usage message customization API initial implementation. Thanks to Christian Helmer for the pull request.
  • [#​530] Added API for easily customizing the usage help message. Thanks to stechio for raising the request and productive discussions.
  • [#​569] Facilitate customization of the synopsis: split Help.detailedSynopsis() into protected methods.
  • [#​508] Annotation API: added @Option(order = <int>) attribute to allow explicit control of option ordering in the usage help message; useful when mixing methods and fields with @Option annotation.
  • [#​588] Added method CommandSpec.names returning both name and aliases.
  • [#​578] Add API for simplified @​files argument files.
  • [#​573] Make simplified @​files JCommander-compatible: ignore empty lines and comments starting with whitespace. Thanks to Lukáš Petrovický for the pull request with test to reproduce the issue.
  • [#​572] CommandSpec.addMethodSubcommands now throws picocli.CommandLine.InitializationException instead of java.lang.UnsupportedOperationException when the user object of the parent command is a java.lang.reflect.Method.
  • [#​581] Added support for ConEmu, ANSICON and other environment variables to improve the ANSI heuristics. Documented the heuristics in the user manual.
  • [#​579] Improved AutoComplete error message when not overwriting existing files.
  • [#​585] picocli.AutoComplete now accepts a parameter specifying a custom IFactory implementation. Thanks to Bob Tiernay for the suggestion.
  • [#​582] picocli.AutoComplete now returns a non-zero return code on error. Thanks to Bob Tiernay for the suggestion.
  • [#​570] Bugfix: Command method options and positional parameter Object values are now cleared correctly when reusing CommandLine. Thanks to Christian Helmer for the pull request.
  • [#​576] Bugfix: fixed StringIndexOutOfBoundsException in shell-jline2 completion when cursor was before = when option parameter was attached to option name.
  • [#​583] Bugfix: Default exception handler now exits on exception if exitCode was set, regardless of exception type.
  • [#​584] Add documentation for generating autocompletion script during a Maven build. Thanks to Bob Tiernay.
  • [#​586] Replace Ansi.Text.clone() with copy constructor.
  • [#​571] Improve test code coverage. Added ~300 tests to bring the total to 1300+ tests. Improved line coverage to 98% (was 88%) and complexity coverage to 98% (was 82%).
  • [#​590] Fail the build if test coverage falls below minimum threshold.
  • [#​589] Fix index.adoc to eliminate warnings; suppress javadoc warnings.
  • [#​566] Add example showing how to customize the usage help message to show the full command tree including nested subcommands. Thanks to lgawron for the request.

Deprecations

No features were deprecated in this release.

Potential breaking changes

CommandSpec.addMethodSubcommands now throws InitializationException instead of java.lang.UnsupportedOperationException when the user object of the parent command is a java.lang.reflect.Method.

AutoComplete application now prints different error message when not overwriting existing script files. This may break tests that verify the console output.

v3.8.2

The picocli community is pleased to announce picocli 3.8.2.

This release contains bugfixes only.

When running a native image with Graal, ANSI colors are now shown correctly.

This is the forty-forth public release.
Picocli follows semantic versioning.

Table of Contents

New and Noteworthy

Fixed issues

  • [#​557] Bugfix: No colors are shown when compiling to a native image with Graal on MacOS. Thanks to Oliver Weiler for the bug report.

Deprecations

No features were deprecated in this release.

Potential breaking changes

This is a patch release and has no breaking changes.

v3.8.1

The picocli community is pleased to announce picocli 3.8.1.

This release contains bugfixes and minor enhancements.

Command methods explicitly throwing a ParametersException is now correctly handled by picocli, showing the error message and the usage help message.

This release adds support for JCommander-style argument files (one argument per line, no quoting) and better tracing.

Many thanks to the many members of the picocli community who contributed!

This is the forty-third public release.
Picocli follows semantic versioning.

Table of Contents

New and Noteworthy

Simplified Argument Files

In this argument file format every line (except comment lines) is interpreted as a single argument. Arguments containing whitespace do not need to be quoted, but it is not possible to have arguments with embedded newlines.

Set system property picocli.useSimplifiedAtFiles without a value or with value "true" (case-insensitive) to enable this simpler argument file format.

This format is similar to the way JCommander processes argument files, which makes it easier for command line applications to migrate from JCommander to picocli.

Improved Tracing

The following information has been added to the tracing output in this release:

  • Version information (picocli version, java version, os version), logged at INFO level
  • ANSI enabled status, logged at DEBUG level
  • Log at DEBUG level when a Map or Collection binding for an option or positional parameter is initialized with a new instance
  • Log at DEBUG level when parameters are being split (into how many parts, show resulting parts)

Fixed issues

  • [#​551] Enhancement: Add support for JCommander-style argument files (one argument per line, no quoting). Thanks to Lukáš Petrovický for the bug report and unit tests.
  • [#​562] Enhancement: Allow for enabling quote trimming via system property picocli.trimQuotes. Thanks to Lukáš Petrovický for the pull request.
  • [#​560] Enhancement: Better tracing.
  • [#​554] Bugfix: Convenience method error handling was broken for command methods that explicitly throw an ParameterException: InvocationTargetException hides the ParameterException. Thanks to SysLord for the bug report.
  • [#​553] Doc: Fix broken link to CommandLine.java source code. Thanks to Simon Legner for the pull request.
  • [#​563] Doc: Improve documentation for explicitly showing usage help from subcommands. Thanks to Steve Johnson for raising this issue.

Deprecations

No features were deprecated in this release.

Potential breaking changes

This is a patch release and has no breaking changes.


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot added the type: dependency upgrade Pull requests that update a dependency file label Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug deps maintenance type: dependency upgrade Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant