Closed gsmet closed 2 years ago
/cc @manovotn, @mkouba
/cc @Ladicek too
I am not in front of my work laptop but there were recently two changes to generation of annotation literals, its's going to be one of them:
NoSuchFieldError: INSTANCE
shows that this is caused by https://github.com/quarkusio/quarkus/commit/e57f709d6eb300eb08091f21bebdd68eb72f5557. Let me take a look.
What I'm wondering is if I still need to create the AnnotationLiteral
s myself or if there is a better solution. That being said, having your own AnnotationLiteral
should be supported.
Having a custom AnnotationLiteral
absolutely must work.
Looking at the generated bytecode, the generated constructor of the generated observer class, in my case io.quarkiverse.githubapp.deployment.GitHubGraphQLClientInjectionTest$ListeningClass_Multiplexer_Observer_deleteLabel_061db032c825046e9c8d2d0a932d5538395c5a34_df5559b104debbf1f7c6df81964f6a4e9d2b96bc
, refers to Field io/quarkiverse/githubapp/event/Label$Deleted_AnnotationLiteral.INSTANCE
, and that seems to exist, as it should.
I'll correct myself: Having a custom AnnotationLiteral
absolutely must work ... unless your custom AnnotationLiteral
is a generated class named <Annotation>_AnnotationLiteral
, which is the exact same name ArC uses for its generated annotation literals :-)
For more context, prior to the commit mention above, the suffix was slightly different which is why this worked. See https://github.com/quarkusio/quarkus/commit/6edd2dcea9a09d4195dd9020cd15e3135a61958f#diff-a2ca7cc07a423ea56e341d4c72c361fb913d4436da612e6a6d2d29c9ac8b4925L40-R40
I've submitted #28789 to fix this, but the proper fix would be #28790. That unfortunately isn't a straightforward refactoring, but there might be a way...
Both Quarkus GitHub App and Quarkus GitHub Action extensions tests are failing with
main
(and onlymain
) with the following error:My understanding is that it would be an error in the generated classes and so probably an error in recent ArC-related work (or somehow I'm doing something that is not expected but it used to work since forever).
Failing build: https://github.com/quarkiverse/quarkus-github-app/actions/runs/3294992831/jobs/5433081604
It's easily reproducible by:
quarkus.version
to latest999-SNAPSHOT
in the parent pommvn clean install
The following tests will fail with the error above: