On 31.01.2017 11:11, Remi Forax wrote:
[...]
Jigsaw is more or less forward compatible, i.e. you can release jars
that will use Java 8  to compile (or Java 9 in release mode 8) and also
make them jigsaw compatible in term of dependencies.
Obviously the module graph will be read only on Java 9 but the classpath
will work on Java 8 (and on Java 9).

Groovy as anonymous module should work right now... at least if you open a lot of packages. Groovy as a module is a totally different story, because we will basically need the same rights that are right now granted to a an anonymous module as normal module, including all the dynamic module handling via layers. And adoption of Groovy in a jigsaw module world depends on Groovy being able to run as module imho.

The issues we will have under Java9 are mostly these:
(1) setAccessible based logic no longer working, which breaks programs that rely on non-public data members from Java classes (2) URLClassLoader assumption no longer valid breaks all programs using @Grab and requiring the systemloader
(3) joint compilation needs to be able to compile a module

I doubt there is going to be a solution for 2, changing 1 will be a huge amount of work, since it is not simply done by moving over to invokedynamic, the initialization sequence of meta classes will be influenced as well. The alternative is dozens of add-opens on the command line right now.

And even the solution to that seems to be far fetched... because it looks like I will need an agent manipulating every module that comes into contact with Groovy to give Groovy extended rights right now.

Number 3 is not even investigated. But of course the biggest piece is Groovy as a module itself.

So it is not so much us doing changes that will not work under earlier JVMs, it is that there will be a major change in how Groovy behaves as a library, because of the restrictions imposed by the module system. And that enabling only the slightest bit beyond what we have now, means bigger changes in how the MOP works may come. And that is why it is a "blow up everything" version

bye Jochen

Reply via email to