Re: DFS vs BFS search of modules during resolution

2021-12-03 Thread Michał Kłeczek
> On 3 Dec 2021, at 15:33, Alan Bateman wrote: > > On 03/12/2021 13:39, Michał Kłeczek wrote: >> Am I missing something? >> > I think you understand it correctly. The notion of multi-parent configuration > and layers is something that was added for those t

Re: DFS vs BFS search of modules during resolution

2021-12-03 Thread Michał Kłeczek
> On 3 Dec 2021, at 14:39, Michał Kłeczek wrote: > > > 2. Is there a way to handle it today? > (Ab)using transitive dependencies might work - I could introduce artificial > module M ---(transitive)-->Y2 and make Z require M (so that resolution would > replace

DFS vs BFS search of modules during resolution

2021-12-03 Thread Michał Kłeczek
Hi All, During my work on lazy loading of modules I stumbled upon the following possible dependency graph that I would like to handle: Y1 X2 ^ ^ | | (non-transitive)(non-transitive) | | |

Re: ModuleLayer.Controller strongly references Module

2021-11-29 Thread Michał Kłeczek
> On 29 Nov 2021, at 10:29, Alan Bateman wrote: >> >> It looks like ML.Controller.addExport(source, pn, target) does not update >> the target module ClassLoader view of exported packages in the default >> ClassLoader implementation (jdk.internal.loader.Loader). >> What is the reasoning

Re: ModuleLayer.Controller strongly references Module

2021-11-28 Thread Michał Kłeczek
> On 24 Nov 2021, at 21:01, Alan Bateman wrote: > > On 24/11/2021 18:14, Michał Kłeczek wrote: >> >> >> For sure it’s fun :) >> >> Regardless of “smart proxies” the lifetime of ML.Controller should be - if >> not fixed - at least be documente

Re: ModuleLayer.Controller strongly references Module

2021-11-24 Thread Michał Kłeczek
> On 24 Nov 2021, at 13:33, Alan Bateman wrote: >> >> 1. Controller is created upon ML construction and returned from static >> ML.defineModules methods. >> 2. Created two controller liveness tests (they rely on System.gc() though - >> not sure if there are some tricks to test it reliably).

Re: ModuleLayer.Controller strongly references Module

2021-11-24 Thread Michał Kłeczek
Hi Alan, (Disregard previous message - fat fingers) Attached is a first draft of the patch: 1. Controller is created upon ML construction and returned from static ML.defineModules methods. 2. Created two controller liveness tests (they rely on System.gc() though - not sure if there are some

Re: ModuleLayer.Controller strongly references Module

2021-11-24 Thread Michał Kłeczek
Hi Alan, Attached is a first draft of the patch. Controller is created upon ML construction and returned from static ML.defineModules methods. > On 22 Nov 2021, at 21:37, Alan Bateman wrote: >> > Assuming it's not exposed, and that there is no reference to the > ML.Controller for the boot

Re: ModuleLayer.Controller strongly references Module

2021-11-23 Thread Michał Kłeczek
Hi Alan, > On 22 Nov 2021, at 21:37, Alan Bateman wrote: > > On 22/11/2021 07:23, Michał Kłeczek wrote: >> >> Would it be too much to ask for accepting a patch adding a reference to >> ML.Controller to ModuleLayer? >> It wouldn’t require changes to

Re: ModuleLayer.Controller strongly references Module

2021-11-21 Thread Michał Kłeczek
From OpenJDK discuss: > On 21 Nov 2021, at 21:55, Alan Bateman wrote: > > On 21/11/2021 13:27, Michał Kłeczek wrote: >> Hello All, >> >> I am looking for a way to associate ModuleLayer.Controller with a Module (or >> ModuleLayer) in such a way that it

Re: Modules with platform specific parts

2021-09-28 Thread Michał Kłeczek
Hi Gregg, I am afraid that train is long gone. Once OpenJDK decided the preferred distribution mechanism for Java applications is to embed the runtime, the notion of Java Platform that would allow installation/execution of platform neutral software packages is gone. Bytecode is no longer

Re: Modules with platform specific parts

2021-09-15 Thread Michał Kłeczek
Hi, Hi, There is another option: API module and multiple platform specific modules (different names like javafx.graphics.linux.aarch64) that require API module and provide services. API module does not “require” any platform specific module but uses ServiceLoader to find a proper