RFR: 8299504: Resolve `uses` and `provides` at run time if the service is optional and missing [v2]

Athijegannathan Sundararajan sundar at openjdk.org
Thu Jan 23 08:50:47 UTC 2025


On Mon, 20 Jan 2025 12:12:20 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> Extend the support for optional dependences to allow for a service to be optional. The post-resolution consistency check specified by `Configuration.resolve` is relaxed to allow for the possibility that the service from a module in the module graph at compile-time but the module is not in the module graph at run-time.
>> 
>> ConfigurationTest is ported from TestNG to JUnit and updated to add new tests testUsesOptionalService$N and testProvidesOptionalService$N. The port to JUnit is mostly trivial/mechanical changes but it does create a bit of noise - I can move this port to another issue if it makes the harder to see the additions to the test.
>
> Alan Bateman has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:
> 
>  - Add Optional Services section from Alex
>  - Merge branch 'master' into JDK-8299504
>  - Initial commit

LGTM

-------------

Marked as reviewed by sundar (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/23147#pullrequestreview-2569211213


More information about the core-libs-dev mailing list