the acyclic module graph

David M. Lloyd david.lloyd at
Mon Dec 7 12:28:47 UTC 2015

On 12/05/2015 11:16 AM, Jochen Theodorou wrote:
> Hi all,
> in the sadly few hours of my spare time these days I am trying to
> understand jigsaw better and I came across the condition that the module
> graph should be acyclic... which made me wonder...
> So Let us assume there is a module groovy.runtime and a module app0,
> which is written in Groovy. groovy.runtime exports a equally named
> package for general use. Since app0 is written in Groovy there is the
> high possibility that I will have to invoke arbitrary methods from app0
> from inside groovy.runtime. Meaning app0 needs to give a read edge to
> groovy.runtime for app0. So app0 depends on groovy.runtime and
> groovy.runtime depends on app0... is that a cricular dependency that is
> forbidden... or was it only for compile time?

There is no reason to forbid cyclic dependencies though, and it is 
sometimes necessary; we discovered this in practice years ago.  I wrote 
an article [1] a while back about different ways that cyclic 
dependencies can be made to work.



More information about the jigsaw-dev mailing list