-
Notifications
You must be signed in to change notification settings - Fork 418
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
Allow empty mixin (Not urgent) #1665
Comments
@nakanaka7 Have you tried annotating the empty mixin with just |
It works fine. Thank you. |
@remkop I'm having a similar issue; in my case the mixin is not empty but provides generic option processing functionality based on mixee.options(). Good to know that the Alternatively, can we have a more appropriate annotation that is accepted by the |
@rsenden Reusing the (I actually don’t understand what problem we are trying to solve here…) 😅 |
@remkop I wasn't (actively) aware that you could use the In cases like described in this issue, we are not trying to mix in command attributes though, so in that regards it makes less sense to add an empty Anyway, I can live with adding the |
I found a mixin without any annotations (@ Option, @ Parameters, etc) will invoke picocli.CommandLine$InitializationException. I tried using such "empty" mixin in the following situation.
real situation
IMixin
is an interface. MixinA, MixinB, MixinC... are the implementation ofIMixin
. The implementations are basically real mixin, but a few case are empty mixins.I could avoid the exception easily by creating the instance directly as following. But allowing such empty mixin will help code
consistency like above.
The text was updated successfully, but these errors were encountered: