Weakness of "requires public"

Paul Benedict pbenedict at apache.org
Wed Jul 27 15:20:19 UTC 2016


The other potential use case I have identified is when two modules carry
transitive dependencies of the same package structures. Module A drags in
Module B, Module C drags in Module D, but both B and D are code clones of
each other. In a realistic scenario, B and D could be Apache Commons Lang
under different module names. In this type of situation, duplicate packages
need to be avoided and I have to eliminate one of these transitive
dependencies at both source and runtime.

Cheers,
Paul

On Tue, Jul 26, 2016 at 11:17 PM, Mark Derricutt <mark at talios.com> wrote:

> On 27 Jul 2016, at 8:27, Malachi de Ælfweald wrote:
>
> > I would not expect to specify any transitive dependency.  I would not
> > expect any user of my API to have to manually specify any transitive
> > dependencies I used in my public API (return types for example).  If they
> > did - that completely breaks the point of me specifying transitive
> > dependencies in the first place.
>
> My view on this - if your code requires those dependencies to compile or
> be resolved by the class loader, it should be declared - otherwise its an
> internal dependency of that module and (could) be pulled in transitively to
> RUN/TEST.
>
>
>
> --
> Mark Derricutt
> http://www.theoryinpractice.net
> http://www.chaliceofblood.net
> http://plus.google.com/+MarkDerricutt
> http://twitter.com/talios
> http://facebook.com/mderricutt
>


More information about the jigsaw-dev mailing list