Question on Implied readability
Alan Bateman
Alan.Bateman at oracle.com
Tue Nov 3 11:53:23 UTC 2015
On 03/11/2015 02:27, Alex Buckley wrote:
>
> It's currently underspecified in Configuration::resolve as "A
> readability graph is then constructed to take account of implicitly
> declared dependences (requires public)."
Yes, the javadoc does indeed need more work.
>
> We'll have to think about the implication of com.baz in layer1
> sometimes offering a 'requires public' on com.bar in layer1, and
> sometimes offering a 'requires public' on com.bar in layer2, depending
> on who is reading com.baz in layer1.
Yes, although for the configuration then the read edges are always to
modules in same configuration or to modules in parent layers. So in
Ali's example then the configuration for layer2 should have have com.foo
reading both com.baz and com.bar in layer1. At runtime then com.foo
might decide to also read com.bar at 2 but it's playing with fire at that
point.
In any case, the issue that Ali ran into turns out to be a small
oversight in the implementation, easily fixed. There is however another
case that will need yet more thought and that is where an
indistinguishable com.bar is in both layers. If they are different
(meaning not equal) then the implementation will be correct. This is
somewhat of a corner case but will need to be handled too.
-Alan.
More information about the jigsaw-dev
mailing list