[External] : Re: ModuleElement doesn't work with generated provides classes?
Jonathan Gibbons
jonathan.gibbons at oracle.com
Mon Aug 28 15:57:47 UTC 2023
https://bugs.openjdk.org/browse/JDK-8315125
-- Jon
On 8/28/23 8:50 AM, Jonathan Gibbons wrote:
>
> I'll file a JBS issue to track this further.
>
> -- Jon
>
>
> On 8/28/23 8:35 AM, Josiah Noel wrote:
>> Just tried explicitly adding a default constructor, but I still
>> receive the same error.
>>
>> On Mon, Aug 28, 2023 at 11:29 AM Jonathan Gibbons
>> <jonathan.gibbons at oracle.com> wrote:
>>
>> The following error message seems relevant:
>>
>> |/M:/Dev/module-directive-bug/blackbox-test-module/src/main/java/module-info.java:[6,41]
>> the service implementation does not have a default constructor:
>> io.avaje.modules.example.GeneratedProvider|
>>
>> -- Jon
>>
>>
>> On 8/26/23 1:04 PM, Josiah Noel wrote:
>>> As requested, I have created a simple example to replicate this
>>> issue. SentryMan/module-directive-bug: showcase annotation
>>> processing bug (github.com)
>>> <https://urldefense.com/v3/__https://github.com/SentryMan/module-directive-bug/tree/master__;!!ACWV5N9M2RV99hQ!O3CMUWVsFHaaU7b9D1x_-4ByzBUrMMF0KeTPmtdnqOC1hRhhZCBO0dODJwf1rZsapQpTYmYktzo5W_0TwANTUZuu$>
>>>
>>> On Fri, Aug 25, 2023 at 9:00 PM Josiah Noel
>>> <josiahnoel at gmail.com> wrote:
>>>
>>> Say I got this module
>>>
>>> ```
>>>
>>> modulenima.example {
>>>
>>> requiresio.avaje.http.client;
>>>
>>> requiresio.avaje.http.api;
>>>
>>> providesio.avaje.http.client.HttpClient.GeneratedComponentwith
>>>
>>> com.jojo.helidon.api.client.httpclient.GeneratedHttpComponent;
>>>
>>> }
>>>
>>> ```
>>> and I generate
>>> com.jojo.helidon.api.client.httpclient.GeneratedHttpComponent in
>>> the last round of processing. When I get the module element
>>> during normal processing and so much as call
>>> `ModuleElement#getDirectives` and do nothing else, the
>>> processor will correctly generate, but compilation will
>>> still fail.(if I take out the module-info from the project
>>> it works though) I'm pretty sure it might have to do with
>>> the fact that GeneratedHttpComponent is created in the last
>>> round. Even so, not sure why it fails the compilation.
>>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/compiler-dev/attachments/20230828/24976317/attachment-0001.htm>
More information about the compiler-dev
mailing list