On Thu, Jan 16, 2025 at 1:07 PM Alex Buckley <alex.buck...@oracle.com> wrote:
> On 1/13/2025 9:37 AM, Alan Bateman wrote: > > `requires static` was added to support annotations that aren't needed at > > runtime, and also some configuration cases. I don't think support for > > optional service interfaces has been ruled out but it's more complex to > > specify that it might appear. > > Alan and I have been discussing resolution of services that were present > at compile time but are missing at run time. See the comments in > https://bugs.openjdk.org/browse/JDK-8299504 (bearing in mind that the > Java Bug System now shows newest-first by default). > > As Alan says, this is a complex matter because of `transitive` > dependencies and qualified exports. It reasons about relationships > between entities declared in the program (modules) in a way that is more > reminiscent of language design than library design. We think we've got > the shape of things nailed down, but continue to polish it. > It's too bad there aren't modifiers for uses/provides which could have been used to (for example) mark them as `static` or something like that. But, it's looking good so far IMO. A change along the lines of what's proposed should work for any use case I can think up. -- - DML • he/him