Re: module information creation for Groovy 3

2018-06-16 Thread Remi Forax



- Mail original -
> De: "Jochen Theodorou" 
> À: "dev" 
> Envoyé: Vendredi 15 Juin 2018 17:38:29
> Objet: Re: module information creation for Groovy 3

> Am 15.06.2018 um 08:58 schrieb Remi Forax:
>> Hi,
>> moditech provides two different things,
>> - if you are an application, you can add the module-info to your 
>> dependencies,
>> from the POV of the VM, it means all your code will be modular so you can use
>> jlink to create a minimal docker file
>> - you can add module-info to your own jar
>> 
>> The first case is fully valid, i do the same thing but fully automatically
>> (doing a static analysis) with pro [1], it's great but only works if you are
>> the final application, not a library,
>> the second case adds maintenance burden because the module-info doesn't get
>> updated when you change the code source or the pom.xml, so you can have the 
>> pom
>> and the module-info disagreeing on the dependency, a package you have just
>> added being exported by default exported (instead of been non-exported by
>> default), a service being declared in the META-INF but not in the module-info
>> etc.
>> 
>> So it means that you have to test your produced jars twice, with the 
>> classpath
>> and with the module-path to catch the regressions you may have introduced by
>> not updating the moditech plugin configuration to the changes done in the
>> source code. Without modifying the test to run twice, you will get nasty
>> surprises :(
> 
> that might be true, but don't I have to do this anyway? And not only
> that. I have to test as a system module as well.

yes !

> 
> bye Jochen

Rémi


Re: module information creation for Groovy 3

2018-06-15 Thread Jochen Theodorou




Am 15.06.2018 um 08:58 schrieb Remi Forax:

Hi,
moditech provides two different things,
- if you are an application, you can add the module-info to your dependencies, 
from the POV of the VM, it means all your code will be modular so you can use 
jlink to create a minimal docker file
- you can add module-info to your own jar

The first case is fully valid, i do the same thing but fully automatically 
(doing a static analysis) with pro [1], it's great but only works if you are 
the final application, not a library,
the second case adds maintenance burden because the module-info doesn't get 
updated when you change the code source or the pom.xml, so you can have the pom 
and the module-info disagreeing on the dependency, a package you have just 
added being exported by default exported (instead of been non-exported by 
default), a service being declared in the META-INF but not in the module-info 
etc.

So it means that you have to test your produced jars twice, with the classpath 
and with the module-path to catch the regressions you may have introduced by 
not updating the moditech plugin configuration to the changes done in the 
source code. Without modifying the test to run twice, you will get nasty 
surprises :(


that might be true, but don't I have to do this anyway? And not only 
that. I have to test as a system module as well.


bye Jochen


Re: module information creation for Groovy 3

2018-06-15 Thread Remi Forax
Hi,
moditech provides two different things,
- if you are an application, you can add the module-info to your dependencies, 
from the POV of the VM, it means all your code will be modular so you can use 
jlink to create a minimal docker file
- you can add module-info to your own jar

The first case is fully valid, i do the same thing but fully automatically 
(doing a static analysis) with pro [1], it's great but only works if you are 
the final application, not a library,
the second case adds maintenance burden because the module-info doesn't get 
updated when you change the code source or the pom.xml, so you can have the pom 
and the module-info disagreeing on the dependency, a package you have just 
added being exported by default exported (instead of been non-exported by 
default), a service being declared in the META-INF but not in the module-info 
etc.

So it means that you have to test your produced jars twice, with the classpath 
and with the module-path to catch the regressions you may have introduced by 
not updating the moditech plugin configuration to the changes done in the 
source code. Without modifying the test to run twice, you will get nasty 
surprises :(

Rémi

[1] https://github.com/forax/pro

- Mail original -
> De: "Jochen Theodorou" 
> À: "dev" 
> Envoyé: Jeudi 14 Juin 2018 23:50:05
> Objet: module information creation for Groovy 3

> Hi all,
> 
> I just found https://github.com/moditect/moditect, there is no gradle
> plugin yet, though it seems there will be soon one. We could use this to
> produce our module information without requiring JDK9 for the build. I
> think we should investigate the usage of this.
> 
> bye Jochen


module information creation for Groovy 3

2018-06-14 Thread Jochen Theodorou

Hi all,

I just found https://github.com/moditect/moditect, there is no gradle 
plugin yet, though it seems there will be soon one. We could use this to 
produce our module information without requiring JDK9 for the build. I 
think we should investigate the usage of this.


bye Jochen