Re: How many times one module can exist in layer graph

2023-12-18 Thread Alan Bateman
On 16/12/2023 17:58, PavelTurk wrote: So, do I understand it correctly - it is a bug? If so, could you provide a link to the issue or JDK-ID so I could track it? I've created JDK-8322302 [1] as a placeholder for now. -Alan [1] https://bugs.openjdk.org/browse/JDK-8322302

Re: How many times one module can exist in layer graph

2023-12-16 Thread PavelTurk
So, do I understand it correctly - it is a bug? If so, could you provide a link to the issue or JDK-ID so I could track it? Best regards, Pavel On 12/16/23 7:52 PM, Alan Bateman wrote: Yes, this is about automatic modules in child configurations/layers. The computation of the readability gra

Re: How many times one module can exist in layer graph

2023-12-16 Thread Alan Bateman
On 15/12/2023 01:26, Alex Buckley wrote: : Unfortunately, Guava is still not an explicit module (https://github.com/google/guava/issues/2970). It is an automatic module. This means it gets a "boost" in terms of the modules that it reads. In fact, we think the implementation of module resol

Re: How many times one module can exist in layer graph

2023-12-14 Thread Alex Buckley
Since layer A and layer B each have their own class loader, there is no problem with each layer loading the same module. Unfortunately, Guava is still not an explicit module (https://github.com/google/guava/issues/2970). It is an automatic module. This means it gets a "boost" in terms of the m

Re: How many times one module can exist in layer graph

2023-12-14 Thread Anand Beh
Hi Pavel, It seems to be the issue that you're loading the Gson jar twice -- once in layer A and once in layer B. The problem is analogous to loading the same jar file in different ClassLoaders (in fact, that's what is happening behind the scenes). You'll get different Class instances, which quick

Re: How many times one module can exist in layer graph

2023-12-14 Thread PavelTurk
Hello, Alan Thank you very much for your answer. I could reproduce this problem. Please, see https://github.com/PavelTurk/jpms-test1 There is a detailed readme and only one class that throws ResolutionException. Best regards, Pavel On 12/14/23 3:07 PM, Alan Bateman wrote: On 14/12/2023 10:56,

Re: How many times one module can exist in layer graph

2023-12-14 Thread Alan Bateman
On 14/12/2023 10:56, PavelTurk wrote: Hello all. Let's suppose that we have 4 layers: 1) boot 2) layerA (parent - boot) 3) layerB (parent-boot) 4) layerC (parents - layerA, layerB) Layers A,B,C were created using defineModulesWithOneLoader​(...). And we have two modules - moduleX and moduleY. 

How many times one module can exist in layer graph

2023-12-14 Thread PavelTurk
Hello all. Let's suppose that we have 4 layers: 1) boot 2) layerA (parent - boot) 3) layerB (parent-boot) 4) layerC (parents - layerA, layerB) Layers A,B,C were created using defineModulesWithOneLoader​(...). And we have two modules - moduleX and moduleY. ModuleX uses moduleY. ModuleX is locate