the acyclic module graph

Alan Bateman Alan.Bateman at
Sat Dec 5 17:38:05 UTC 2015

On 05/12/2015 17:16, 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?

This is just a cycle in the readability graph at run-time, not a 
problem, and "normal" when the framework is accessing something in its 
consumer. There are also cycles when there are automatic modules in the 
picture because automatic modules read all other modules.

The strict requirement is that there isn't a cycle in the dependency 
graph. This should be caught at compile-time, and at run-time when 
creating a configuration (think startup for now).


More information about the jigsaw-dev mailing list