Implied readability + layers
ali.ebrahimi1781 at gmail.com
Thu Nov 5 15:06:11 UTC 2015
On Thu, Nov 5, 2015 at 5:32 PM, Alan Bateman <Alan.Bateman at oracle.com>
> On 05/11/2015 13:17, Ali Ebrahimi wrote:
>> If API usage of com.baz in com.foo does not contain any type of com.bar
>> you wouldn't have any issue, otherwise com.foo must live on layer1.
> Are there com.bar types in com.baz's API? If not then users of com.baz
> need to vigorously lobby the maintainer of com.baz to stop using requires
> public. If com.baz agrees then com.foo will not read com.bar at 1 and this
> frees up com.foo to use another version of com.bar in layer2.
> On the other hand, if there are com.bar types in com.baz's API then
> com.foo will be exposed to com.bar at 1 types.
If com.foo does not use any com.baz's com.bar depend API or com.bar depend
API added latter or requires public in com.baz added later or removed
latter any com.foo may be not aware that, estimating what version of
com.bar for com.foo module that depend on com.bar at 2 would be quite puzzling
and this would be a good candidate for next edition of java puzzlers book.
But with one simple rule "Always current layer's version of module win over
parent layer's one. you don't have unexpected result as in this example
com.bar at 2 may be ignored while com.foo not being aware.
More information about the jigsaw-dev