[#2506] Preserve original required state - #2525
Open
emerardd wants to merge 1 commit into
Open
Conversation
emerardd
marked this pull request as ready for review
July 24, 2026 03:19
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
originallyRequiredfrom annotated option and positional parameter definitionsrequiredflagCloses #2506.
Validation
Using JDK 21:
.\gradlew.bat :test --tests 'picocli.HelpTest.testDefaultOptionRenderer_usesOriginalRequiredStateForArgGroupOptions' --tests 'picocli.ModelArgSpecTest.testOriginallyRequiredReflectsAnnotatedRequiredState' --console=plain --configure-on-demand --rerun-tasks(both new tests passed).\gradlew.bat :test --tests 'picocli.HelpTest' --tests 'picocli.ModelArgSpecTest' --console=plain --configure-on-demand --rerun-tasks(301 tests, 0 failures, 1 skipped).\gradlew.bat :compileJava --console=plain --configure-on-demand --rerun-tasksgit diff --checkThe root-module test run completed 2,283 tests: 2,282 passed and 32 were skipped; the only failure was the existing Windows/Jansi environment probe
HelpAnsiTest.testAnsiEnabled. Maven/Gradle Plugin Portal TLS handshakes were unavailable in this environment, so the successful local runs used the cached dependencies through a temporary offline init script; CI should provide the authoritative clean-environment result.