WELD-2828 Ensure a proxy target JPMS module can read Weld JPMS modules#3280
WELD-2828 Ensure a proxy target JPMS module can read Weld JPMS modules#3280arjantijms wants to merge 0 commit intoweld:6.0from
Conversation
|
IIUIC, you only need this because we don't have module name that the other project could explicitly declare If that's the case then I think we should rather look into having at least the automatic module names. Also, this only solves the case when default proxy services are used - integrators are allowed to override that. |
No, unfortunately not. Weld is an implementation module where modules for which proxies are created probably not know about, or almost certainly don't know about. Even if a module is aware that its classes are used for CDI, it's still not advisable for such module to declare a dependency on specific Weld modules. Therefore, Weld having an automatic module name or even a true module-info.java would not change anything here. |
The problem is basically that we are already putting (injecting) a generated class into a target module. That generated class (the proxy) uses private implementation classes that the target module does not have access to. Essentially that is the part that in a modulair world doesn't feel quite right, but obviously we can't just easily redesign that. |
|
Thank you for the explanation, it makes sense now. The only thing I am considering is whether this should be added to |
|
p.s.
Yes, that's why I added it specifically there and not somewhere further up. Integrators have to use their own code and/or maybe look at the default proxy services as example. |
|
Oops, made a bad push while renaming the commit to include the JIRA issue and that closed it. |
When running Weld purely on the module path, it appears generated proxies don't work out of the box.
Weld contains code to ensure it can read the target module for which a proxy is inserted, but it doesn't do the reverse; make sure the target module can read Weld. This latter is needed because the proxy uses Weld classes, so the module obviously needs to have access to Weld.
This came up in eclipse-ee4j/jersey#6043