Alternatives to automatic modules as a concept

David M. Lloyd david.lloyd at redhat.com
Fri Mar 17 14:16:22 UTC 2017


On 03/17/2017 09:08 AM, Alan Bateman wrote:
> On 17/03/2017 13:36, David M. Lloyd wrote:
>
>>
>> SLF4J APIs and implementations are cyclic.  You have to manually
>> bundle them into a single JAR before they could work with automodules.
> BTW: Which of the providers are you using to see the problem? I'm
> wondering if you might have converted them to explicit modules rather
> than leave them as automatic modules.  FWIW, I don't see any issues when
> using the simple/default implementation:
>
> $ java -p mlib --list-modules slf4j.api,slf4j.simple
> automatic module slf4j.api at 1.7.25 (file:///d/mlib/slf4j-api-1.7.25.jar)
>   requires mandated java.base
>   contains org.slf4j
>   contains org.slf4j.event
>   contains org.slf4j.helpers
>   contains org.slf4j.spi
> automatic module slf4j.simple at 1.7.25
> (file:///d/mlib/slf4j-simple-1.7.25.jar)
>   requires mandated java.base
>   contains org.slf4j.impl
>
> $ java -p mlib--add-modules slf4j.api,slf4j.simple -m m/p.Main
> [main] INFO p.Main - started

Hmm, so automatic modules explicitly are going to allow cycles then? 
How is that going to not hinder migration, if cycles are disallowed once 
the thing is properly modularized?

-- 
- DML


More information about the jigsaw-dev mailing list