Re: Cyclic dependencies during multi-module compilation

2018-05-09 Thread Alan Bateman
On 09/05/2018 08:30, Nicolai Parlog wrote: Hi Alan, so just to get this straight, there should be a compile error, yes? I'm sure there was one while Java 9 was in EA and now there isn't anymore, which bugs the hell out of me because my book claims, there's going to be one. :( There seems to a

Re: Cyclic dependencies during multi-module compilation

2018-05-09 Thread Nicolai Parlog
Hi Alan, so just to get this straight, there should be a compile error, yes? I'm sure there was one while Java 9 was in EA and now there isn't anymore, which bugs the hell out of me because my book claims, there's going to be one. :( > Would it be possible to package this up and send it as an at

Re: Cyclic dependencies during multi-module compilation

2018-05-08 Thread David Lloyd
I still consider this to be a non-bug. The cycle check has absolutely no useful purpose other than "scratching an itch". On Tue, May 8, 2018 at 3:01 AM, Nicolai Parlog wrote: > Hi! > > In early access builds, multi-module compilation would fail if there was > a dependency cycle between the invo

Re: Cyclic dependencies during multi-module compilation

2018-05-08 Thread Alan Bateman
On 08/05/2018 11:16, Nicolai Parlog wrote: Here it is: https://github.com/CodeFX-org/demo-jpms-monitor/blob/break-cyclic-dependency-compile-time/monitor.statistics/src/main/java/module-info.java#L3 Maybe you looked at the master branch? Would it be possible to package this up and send

Re: Cyclic dependencies during multi-module compilation

2018-05-08 Thread Zheka Kozlov
Sorry. I switched to the branch and now I see the issue. Looks like a bug for me. 2018-05-08 17:16 GMT+07:00 Nicolai Parlog : > Here it is: > > https://github.com/CodeFX-org/demo-jpms-monitor/blob/break- > cyclic-dependency-compile-time/monitor.statistics/src/ > main/java/module-info.java

Re: Cyclic dependencies during multi-module compilation

2018-05-08 Thread Nicolai Parlog
Here it is: https://github.com/CodeFX-org/demo-jpms-monitor/blob/break-cyclic-dependency-compile-time/monitor.statistics/src/main/java/module-info.java#L3 Maybe you looked at the master branch? On 08.05.2018 12:11, Zheka Kozlov wrote: > Are you sure that you have a cycle between modul

Re: Cyclic dependencies during multi-module compilation

2018-05-08 Thread Zheka Kozlov
Are you sure that you have a cycle between modules? You state that "monitor.statistics depends on monitor.persistence", however I do not see this in module-info.java: module monitor.statistics { requires monitor.observer; exports monitor.statistics; } 2018-05-08 16:34 GMT+07:00 Nicolai Parlog :

Re: Cyclic dependencies during multi-module compilation

2018-05-08 Thread Nicolai Parlog
Hi Zheka, this branch demonstrates what I describe: https://github.com/CodeFX-org/demo-jpms-monitor/tree/break-cyclic-dependency-compile-time Run `multi-compile.sh && run.sh` and you will see the compiler happily creating the modules whereas the runtime complains about the cyclic depen

Re: Cyclic dependencies during multi-module compilation

2018-05-08 Thread Alan Bateman
On 08/05/2018 09:01, Nicolai Parlog wrote: Hi! In early access builds, multi-module compilation would fail if there was a dependency cycle between the involved modules. I just realized that that is no longer the case in 9.0.1 and later (up to Java 11). This sounds like a bug and I would expect

Re: Cyclic dependencies during multi-module compilation

2018-05-08 Thread Zheka Kozlov
Hi Nicolai. I cannot reproduce what you said. I'm using JDK 10.0.1. I created two modules moduleA and moduleB which require each other. When I tried to compile, javac failed with an error: cyclic dependence involving module. Do you observer a different behavior? 2018-05-08 15:01 GMT+07:00 Nicola

Cyclic dependencies during multi-module compilation

2018-05-08 Thread Nicolai Parlog
Hi! In early access builds, multi-module compilation would fail if there was a dependency cycle between the involved modules. I just realized that that is no longer the case in 9.0.1 and later (up to Java 11). I'm interested to learn the background for that decision? I considered that check A Go