<!DOCTYPE html><html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
On 18/12/2024 15:09, David Lloyd wrote:<br>
<blockquote type="cite" cite="mid:CANghgrRJedds8Qwxep80nh1+syxTPgsdoQ28euuNDEk4oCjMLg@mail.gmail.com">
<div dir="ltr">
<div dir="ltr">
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif">:<br>
</div>
</div>
<div class="gmail_quote gmail_quote_container">
<div><br>
</div>
<div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif">No. Since
we are late-binding all modules, every module we would
load would start with no `requires`, and we use `addReads`
on the controller to wire in the dependencies when the
module is lazily linked.</div>
</div>
</div>
</div>
</blockquote>
<br>
I'm going to stop here as I think there is enough in this sentence
to put context on where you are coming from and why some of the
previous mails were a bit baffling.<br>
<br>
If I've compiled my code as a module then it will have declared its
dependencs, it may use or provide services, and it might export some
internal packages to other modules in the project. I think your
mail is suggesting that the module-info.class is modified, or
substituted, in your system to not have any references to other
modules. Once the module is reified by creating a single-module
module-layer then read edges will be added dynamically. I assume
that anything that uses APIs to examine the Module or
ModuleDescriptor will see a module that only requires java.base.<br>
<br>
My view is that this direction is in a completely different design
space to that of configurations and module layers. We did build an
internal API to support very specific "dynamic module" use-cases in
the JDK, e.g. some Proxy scenarios required do code gen into a
dynamic code, same thing with code generation for RMI remove refs.
We decided to not expose anything at this level as it's essentially
the all powerful Unsafe API for modules.<br>
<br>
So within the current design, I don't think adding
addUses/addProvides methods to ML.Controller make sense.<br>
<br>
-Alan<br>
<br>
<br>
<br>
<br>
<br>
</body>
</html>