Configuration.resolveRequires want providers of services to be in an exported package

2016-11-19 Thread Remi Forax
Hi all, hi Alan, With 9-ea+144-jigsaw-nightly-h5735-20161117, it seems that Configuration.resolveRequires() do more checks than necessary, it checks that each provider of a service has its package exported, something which is not required by the spec. Maybe i'm wrong, but it should just check tha

ModuleDescriptor.Builder.provides() is too restrictive

2016-11-19 Thread Remi Forax
Hi all, Currently the spec supports two ways to declare several providers for one service: provides com.github.forax.pro.main.runner.Runner with com.github.forax.pro.main.JSONRunner, com.github.forax.pro.main.JShellRunner; or provides com.github.forax.pro.main.runner.Runner with

ModuleDescirptor.Builder and open module

2016-11-19 Thread Remi Forax
Hi all (again), as far as i know, it seems there is no way to programmatically using the ModuleDescriptor.Builder API creates an open module. There is a package private method for that but no public visible method. cheers, Rémi

Re: Configuration.resolveRequires want providers of services to be in an exported package

2016-11-19 Thread Alan Bateman
On 19/11/2016 14:34, Remi Forax wrote: Hi all, hi Alan, With 9-ea+144-jigsaw-nightly-h5735-20161117, it seems that Configuration.resolveRequires() do more checks than necessary, it checks that each provider of a service has its package exported, something which is not required by the spec. May

Re: ModuleDescriptor.Builder.provides() is too restrictive

2016-11-19 Thread Alan Bateman
On 19/11/2016 14:44, Remi Forax wrote: Hi all, Currently the spec supports two ways to declare several providers for one service: provides com.github.forax.pro.main.runner.Runner with com.github.forax.pro.main.JSONRunner, com.github.forax.pro.main.JShellRunner; or provides

Re: ModuleDescirptor.Builder and open module

2016-11-19 Thread Alan Bateman
On 19/11/2016 14:52, Remi Forax wrote: Hi all (again), as far as i know, it seems there is no way to programmatically using the ModuleDescriptor.Builder API creates an open module. There is a package private method for that but no public visible method. The builder API still needs a bit of w

Re: ModuleDescriptor.Builder.provides() is too restrictive

2016-11-19 Thread forax
I have something fun currently, i've (at least) two errors in my configuration, and depending on the run i get one error or the other because the code is full of hashmap/hashset so the iteration order between runs changed :( Rémi - Mail original - > De: "Alan Bateman" > À: "Remi Forax"

Re: Configuration.resolveRequires want providers of services to be in an exported package

2016-11-19 Thread forax
Ok, find the bug, obvious in retrospect, there is no way to declare a concealed package using the ModuleDescriptor.Builder so my configuration miss concealed packages thus the configuration that i try to verify is ill formed. The builder should be able to declare concealed packages or all packag

Re: ModuleDescriptor.Builder.provides() is too restrictive

2016-11-19 Thread forax
Ok ! Rémi - Mail original - > De: "Alan Bateman" > À: "Remi Forax" , "jigsaw-dev" > > Envoyé: Samedi 19 Novembre 2016 18:24:39 > Objet: Re: ModuleDescriptor.Builder.provides() is too restrictive > On 19/11/2016 14:44, Remi Forax wrote: > >> Hi all, >> Currently the spec supports two

Re: Configuration.resolveRequires want providers of services to be in an exported package

2016-11-19 Thread Alan Bateman
On 19/11/2016 18:02, fo...@univ-mlv.fr wrote: Ok, find the bug, obvious in retrospect, there is no way to declare a concealed package using the ModuleDescriptor.Builder so my configuration miss concealed packages thus the configuration that i try to verify is ill formed. The builder should b

Re: Configuration.resolveRequires want providers of services to be in an exported package

2016-11-19 Thread forax
Apart the fact that the method should be called packages(), no :) Also the implementation makes the order of the calls important, i.e. contains() has to be called after all the other methods. If you move the code that checks that a package can not be at the same time in concealed packages and in

Re: Configuration.resolveRequires want providers of services to be in an exported package

2016-11-19 Thread Alan Bateman
On 19/11/2016 19:19, fo...@univ-mlv.fr wrote: Apart the fact that the method should be called packages(), no :) Also the implementation makes the order of the calls important, i.e. contains() has to be called after all the other methods. If you move the code that checks that a package can not

Re: onejars under Jigsaw

2016-11-19 Thread Michael Rasmussen
Hi I don't know if it already exists somewhere, but it shouldn't be hard to create a main method that's loaded with -jar which then bootstraps all the modules found inside the jar file. For instance, say all your modules are inside your fatjar.jar!/mods directory, and you have the name of the main

Configuration checks on uses service is too strict

2016-11-19 Thread Remi Forax
Ok, i may have a found bug. The spec says (section 1.1.3) "The service interface may be declared in the current module or in another module. If the service interface is not declared in the current module, then the service interface must be accessible to code in the current module, or a compile-

Re: onejars under Jigsaw

2016-11-19 Thread Robert Scholte
Hi, The following topics have been created for this issue: http://openjdk.java.net/projects/jigsaw/spec/issues/#MultiModuleExecutableJARs http://openjdk.java.net/projects/jigsaw/spec/issues/#MultiModuleJARs Once resolved we should improve the maven-shade-plugin according the new specifications

Re: Configuration checks on uses service is too strict

2016-11-19 Thread Alan Bateman
On 19/11/2016 20:39, Remi Forax wrote: Ok, i may have a found bug. The spec says (section 1.1.3) "The service interface may be declared in the current module or in another module. If the service interface is not declared in the current module, then the service interface must be accessible to