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
Picocli 4.2.0 added support for injecting CommandSpec into custom IVersionProvider implementation classes.
However, the annotation processor raises a compile-time error with message @Spec must be enclosed in a @Command, but was <class> when a IVersionProvider implementation class has a @Spec-annotated field.
(picocli-codegen/src/main/java/picocli/codegen/annotation/processing/AbstractCommandSpecProcessor.java, line 843).
The workaround is to use variables like ${COMMAND-NAME} or ${COMMAND-FULL-NAME} in the returned version string.
The text was updated successfully, but these errors were encountered:
Picocli 4.2.0 added support for injecting
CommandSpec
into customIVersionProvider
implementation classes.However, the annotation processor raises a compile-time error with message
@Spec must be enclosed in a @Command, but was <class>
when aIVersionProvider
implementation class has a@Spec
-annotated field.(picocli-codegen/src/main/java/picocli/codegen/annotation/processing/AbstractCommandSpecProcessor.java, line 843).
The workaround is to use variables like
${COMMAND-NAME}
or${COMMAND-FULL-NAME}
in the returned version string.The text was updated successfully, but these errors were encountered: