[External] : Re: How to open a package from a module in the boot layer to a module in another layer?
Alan Bateman
alan.bateman at oracle.com
Tue Jan 14 16:50:51 UTC 2025
On 14/01/2025 09:17, Code Ranger wrote:
> Alex, thank you very much for your suggestion and the link with
> important information.
>
> On 1/14/25 00:27, Alex Buckley wrote:
>> You can split your application so that a small loader module goes in
>> the boot layer, while the bulk of the application (CORE module, API
>> module, etc) lives in a child layer. That child layer becomes the
>> parent for the plugins' layers. You are already resolving plugin
>> modules (and their dependencies, such as Gson) in the context of
>> their own layers, so no change there.
>>
>
> Such a solution will lead to significant and unjustified complication
> of the application. At the same time, it will still not be universal,
> as it does not apply to JDK modules, which can only reside in the boot
> layer. A solution that is not universal cannot be considered a good
> solution.
Alex's suggestion is good, esp. for the scenario where there is discord
between the authors of API+CORE and the author of a plugin that wants to
access the internals of one or both of these modules.
For the JDK modules then I think we need to understand more about the
issues you are dealing with. Is this about serialization, or is this
plugin code that needs to be fixed to not depend on JDK internals. We
get it that you can't know all the bad things that these plugins might
do but this doesn't mean it's a problem that should be solved.
-Alan
More information about the jigsaw-dev
mailing list