On 05.11.2016 13:56, Alan Bateman wrote:
On 05/11/2016 10:29, Jochen Theodorou wrote:
On 05.11.2016 08:39, Alan Bateman wrote:
The application module reads other modules rather than layers, in this
case it results in the application module reading C, B-1, D, and B-2
(assuming that the application modules `requires C` and `requires D` and
both of these modules `requires transitive B`). This will fail because
the application reads B-1 and B-2, both of which export the same
packages to the application module.
And if that is done at runtime ti still fails?
The exception will be thrown when you attempt to create the
configuration containing the application module. So yes, it's run time,
there is no equivalent at compile or link time because this is
dynamically created configurations + layers.
so it is possible at runtime.
Still I don“t get why it should fail at compile time. if the application
requires C and D and they require each B...ahh, the misunderstanding is
probably that B-1 and B-2 are two versions of the module B. Of course I
would not compile my application with B-1 and B-2 being there at the
same time. But I can compile using either of them as B. Since there is
only one of them, there will be no compile time failure... unless
application uses something from B-1, that does not exist in B-2 and
something from B-2 that does not exist in B-1. But that would not work
out at runtime either.
bye Jochen