[External] : Re: provides and requires static ... runtime error
Ron Pressler
ron.pressler at oracle.com
Sun Apr 23 17:47:59 UTC 2023
On 23 Apr 2023, at 18:16, Gregg Wonderly <greggwon at cox.net<mailto:greggwon at cox.net>> wrote:
It seems “bad” to somehow impose an order by taking a “package” (jar) and turning it into a list (classpath).
The modules in the JAR won’t be able to have split packages so order shouldn’t matter.
Again, I really think that order of reference and use should be explicit. If there is manifest data describing an ordering that is explicit there, that might work, but we still have the problem that if I need a different ordering to use a service or other interface implementation as an override of what the multi-module jar contains, we need to control that somehow very explicitly. Stacking so many “orderings” to implicit details will be more problematic than a simplifying detail it seems to me.
Ordering shouldn’t (ideally) matter at all. If an application wants to “override" A with B to ensure A isn’t used, it should not include A. The old way is to just throw everything into one big pile and let the runtime choose what gets used according to some rules; the new way is supposed to be different. The application specifies everything it uses and nothing but what it uses. Providing too much should, ideally, fail just as providing too little.
— Ron
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/jigsaw-dev/attachments/20230423/07acb36b/attachment.htm>
More information about the jigsaw-dev
mailing list