Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JPMS preparation #5232

Closed
wants to merge 15 commits into from
Closed

JPMS preparation #5232

wants to merge 15 commits into from

Conversation

vietj
Copy link
Member

@vietj vietj commented Jun 13, 2024

Update the code to provide support for JPMS in Vert.x 5.

This contribution does not add JPMS support yet, it prepares the vertx-core artefacts to use JPMS.

The main motivations driving this effort are:

  • support an internal API for Vert.x stack and integrators of Vert.x (e.g. Quarkus, etc...) that does not use qualified exports (export pkg to module) since this approach couples the modules to the users of this module, which workrs only in a closed world (i.e vertx stack exclusively)
  • hide the internal API from most users that shall not see this when they do not need it

The pattern used to implement this is the following:

  • an api module which contains the public API
  • an internal module that requires the api module which contains the internal API
  • a impl module that requires transitively the api module and the internal module

Users in practice will use the impl module, will see the api module but will not see the internal module unless they explicitly require it.

In the context of vertx-core the mapping is

  • api : module=io.vertx.core.api, GAV=vertx-core-api, package=io.vertx.core
  • internal : module=io.vertx.core.internal, GAV=vertx-core-internal, package=io.vertx.internal.core
  • impl : module=io.vertx.core, GAV=vertx-core, package=io.vertx.impl.core

This approach keeps the io.vertx.core package for vertx-core-api and preserves the backward compatibility of existing APIs. The internal API and the implementation however package names are changed in order to avoid a JPMS split package.

An alternative of #5233

@vietj vietj added this to the 5.0.0 milestone Jun 13, 2024
@vietj vietj self-assigned this Jun 13, 2024
@vietj vietj changed the title JPMS support JPMS preparation Jun 13, 2024
This was referenced Jun 13, 2024
@vietj vietj closed this Jun 25, 2024
@vietj vietj removed this from the 5.0.0 milestone Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant