-
Notifications
You must be signed in to change notification settings - Fork 427
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
Custom IParameterConsumer causes native-image to fail #803
Comments
Thank you for raising this issue and for the pull request! |
I added a commit to my branch that should, in theory, test for this fix, but I can't seem to get it to work, and I'm not sure if it's my weak gradle skills, or what. |
@byteit101, it could be because I already merged that PR. Maybe create another branch? |
I might have misread. Did you mean you have trouble getting the test to work? If you can share the code we can look at it together... |
Yes, the latter. I can't seem to get them to work. Works fine when I do a command line generation, but through gradle test it fails. Code is byteit101@1e7b2f5 and I'm kinda stuck. Looks to me like it should work, but I'm clearly missing something, either in gradle (gradle n00b here), or in your test framework, or something else. |
Code looks fine to me too. Can you put it in a pull request? |
I went ahead and released picocli 4.0.4 with your PR and the additional changes to the annotation processor to correctly handle Please verify that this solves the issue. |
This happens to my code with picocli 4.6.1 running on OpenJDK 11. |
Hi @pedrolamarao |
I'll see to it next week. We discovered that this happens only if the parameter consumer is an inner non static class. An inner static class works. (If this is a known limitation, we totally missed it from the documentation.) |
@pedrolamarao Thank you for the clarification. Yes, that is a know limitation (for more details, see this ticket: #1297), Thanks again for raising this! |
Using a file with a custom parameter consumer:
The issue seems to be that the
LocalPC
class is not put into the reflection output by theReflectionConfigGenerator
, and manually putting it in I get it to build and show help successfullyThe text was updated successfully, but these errors were encountered: