You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am experiencing a similar outcome as #850 ; however, my scenario must be unrelated since that issue was resolved.
I am building a "native image" with GraalVM 17.0.8+9-LTS-jvmci-23.0-b14. Executing the application with no arguments results in the exception shown below. Dependencies in gradle build are
Exception in thread "main" picocli.CommandLine$InitializationException: picocli.CommandLine$AutoHelpMixin@39308[11](https://github.com/itzg/try-picocli-graalvm-mixinstdhelp/actions/runs/6066310058/job/16456756746#step:5:12)e is not a command: it has no @Command, @Option, @Parameters or @Unmatched annotations
at picocli.CommandLine$Model$CommandReflection.validateCommandSpec(CommandLine.java:[12](https://github.com/itzg/try-picocli-graalvm-mixinstdhelp/actions/runs/6066310058/job/16456756746#step:5:13)023)
at picocli.CommandLine$Model$CommandReflection.extractCommandSpec(CommandLine.java:11853)
at picocli.CommandLine$Model$CommandSpec.forAnnotatedObject(CommandLine.java:6388)
at picocli.CommandLine$Model$CommandSpec.mixinStandardHelpOptions(CommandLine.java:7385)
at picocli.CommandLine$Model$CommandReflection.extractCommandSpec(CommandLine.java:11848)
at picocli.CommandLine$Model$CommandSpec.forAnnotatedObject(CommandLine.java:6388)
at picocli.CommandLine.<init>(CommandLine.java:230)
at picocli.CommandLine.toCommandLine(CommandLine.java:3631)
at picocli.CommandLine.access$16700(CommandLine.java:[14](https://github.com/itzg/try-picocli-graalvm-mixinstdhelp/actions/runs/6066310058/job/16456756746#step:5:15)8)
at picocli.CommandLine$Model$CommandReflection.initSubcommands(CommandLine.java:1[18](https://github.com/itzg/try-picocli-graalvm-mixinstdhelp/actions/runs/6066310058/job/16456756746#step:5:19)78)
at picocli.CommandLine$Model$CommandReflection.extractCommandSpec(CommandLine.java:11844)
at picocli.CommandLine$Model$CommandSpec.forAnnotatedObject(CommandLine.java:6388)
at picocli.CommandLine.<init>(CommandLine.java:230)
at picocli.CommandLine.<init>(CommandLine.java:224)
at picocli.CommandLine.<init>(CommandLine.java:[19](https://github.com/itzg/try-picocli-graalvm-mixinstdhelp/actions/runs/6066310058/job/16456756746#step:5:20)9)
at app.Application.main(Application.java:14)
Can confirm. I have no subcommand defined but I encounter this issue in Windows and Linux. Maven 3.8.4, picocli 4.7.5. Main class entry is present but Mixin class entry is missing. Manually adding it fixed the issue.
@itzg You wrote "when it works", did it on occasion work for you?
Can confirm. I have no subcommand defined but I encounter this issue in Windows and Linux. Maven 3.8.4, picocli 4.7.5. Main class entry is present but Mixin class entry is missing. Manually adding it fixed the issue.
@itzg You wrote "when it works", did it on occasion work for you?
Thank you both for raising this!
@mfuerstenau you mentioned that you are able to reproduce the issue in a top-level command without subcommands; can you provide more details to help me reproduce the issue? (How many options, does the command have positional parameters, other mixins, ...)
@itzg You wrote "when it works", did it on occasion work for you?
@mfuerstenau I just meant when there is only one option field declared then the mixin class got auto-discovered and captured in the reflect json. When there were two options, it didn't.
I found what is causing my issue: the second option in my command class is named "version", which overlaps with the standard help options. At this point the mixin is not added to the outer ComandSpec:
I am experiencing a similar outcome as #850 ; however, my scenario must be unrelated since that issue was resolved.
I am building a "native image" with GraalVM 17.0.8+9-LTS-jvmci-23.0-b14. Executing the application with no arguments results in the exception shown below. Dependencies in gradle build are
I have created a project that reproduces the issue and this Github actions build shows the execution failure.
It seems to be a very particular combination of declarations. I have a sub-command where
@Command
declaresmixinStandardHelpOptions = true
@Option
fieldsIf I comment out the
mixinStandardHelpOptions = true
or the second option, then the built executable runs fine.Upon further investigation, I found that the build with failing executable is missing the following entry in the generated
reflect-config.json
:Failure exception
reflect-config.json
when it doesn't workreflect-config.json
when it worksThe text was updated successfully, but these errors were encountered: