Skip to content

build: JPMS modules for the library, surefire and failsafe on the module path - #538

Open
dfa1 wants to merge 1 commit into
mainfrom
build/jpms
Open

dfa1 wants to merge 1 commit into
mainfrom
build/jpms

Conversation

@dfa1

@dfa1 dfa1 commented Oct 13, 2026 •

Copy link
Copy Markdown
Owner

Supersedes the stale draft #176; the decision and rules are recorded in ADR 0024 (updated from Proposed to Accepted).

Named modules (module name = package root): core, fsst, reader, writer, csv, jdbc, inspector (io.github.dfa1.vortex.inspect, matching its package, not the artifact name). integration gets a code-less main descriptor so failsafe runs on the module path too.

Stable Automatic-Module-Name for the libraries parquet and calcite: they depend on jars with no descriptor (hardwood, calcite), which ADR 0024 says a published module should not requires. cli, jdbc-driver and the generators are never required and pin nothing. performance, demo, fuzz are unpublished and stay on the classpath.

Tests stay white-box: they live in the packages they test and are patched into the module (--patch-module), as surefire/failsafe and IntelliJ both do for a module with a main-only module-info.

Details:

  • core exports fbs/proto only to the modules that need them; ArrayStats.fromFbs, VariantData, EncodeResult, MinMax, CascadeStep and PrimitiveEncodingEncoder suppress the exports lint where a generated type is part of a public signature.
  • The writer never requires the reader: its tests see the reader on the test classpath, and the two --add-exports of core's fbs/proto are test-JVM flags in the writer POM (test.modules.args). The writer test compile needs no flags, so IDEs import main and test with one compiler configuration; the one test that needed java.net.http (HTTP zone-map pruning) moved to integration.
  • zstd is a named module, so native access is enabled by name (--enable-native-access=io.github.dfa1.zstd) instead of ALL-UNNAMED; the README says so.
  • The core test-jar now only ships core.testing: it used to re-declare core's packages, a split package on the module path.
  • DocsJavaCompilerTest compiles the doc snippets against the module path as well as the classpath.
  • JDK 26+'s incubating-module lint (jdk.incubator.vector via core's requires static) is silenced in the root compiler config; javadoc, which has no switch for it, tolerates that one warning on JDK 26+ in every module (root profile, moved from core).
  • Javadoc no longer auto-links sibling modules: the links pointed at a non-existent ${project.url}/<artifact>/apidocs/ and failed classpath modules (jdbc-driver, demo) linking a named one.

Rebased onto main 2026-10-25. Verified locally on JDK 25 (./mvnw verify) and JDK 26 (verify -DskipTests); CI green on macOS, Linux and Windows, JDK 25 and 27.

🤖 Generated with Claude Code

https://claude.ai/code/session_01SwhK4W5cgj7y7s4ZPCif5x

@dfa1 dfa1 changed the title build: named JPMS modules for core, fsst, reader and writer build: JPMS modules for the library, surefire and failsafe on the module path Oct 13, 2026
@dfa1
dfa1 force-pushed the build/jpms branch 2 times, most recently from 88e3474 to a129d18 Compare October 25, 2026 14:26
core, fsst, reader, writer, csv, jdbc and inspector are named modules (module name = package root,
so inspector is io.github.dfa1.vortex.inspect); integration has a code-less main descriptor so failsafe
runs on the module path too. Tests stay in the packages they test and are patched into the module, as
surefire/failsafe and IntelliJ both do for a main-only module-info.

- core exports fbs/proto only to the modules that need them; a public signature carrying a generated
  type suppresses the exports lint on that declaration instead of widening the export.
- The writer never requires the reader: its tests reach the reader on the test classpath, with the two
  --add-exports of core's fbs/proto as test-JVM flags (test.modules.args). The one writer test using
  java.net.http (HTTP zone-map pruning) moved to integration, so the writer test compile needs no flags
  and IDEs import main and test with one compiler configuration.
- parquet and calcite depend on jars with no descriptor, so they pin a stable Automatic-Module-Name
  instead; cli, jdbc-driver and the generators are never required and pin nothing.
- zstd is a named module: native access is enabled by name (--enable-native-access=io.github.dfa1.zstd).
- The core test-jar ships only core.testing (re-declaring core's packages is a split package).
- JDK 26+: the incubating-module lint is off for javac; javadoc, which cannot silence it, tolerates
  that one warning in every module. Javadoc no longer auto-links sibling modules (the links pointed at
  a non-existent ${project.url}/<artifact>/apidocs/ and failed classpath modules linking named ones).
- ADR 0024 moves from Proposed to Accepted with these rules.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SwhK4W5cgj7y7s4ZPCif5x

This branch has not been deployed

No deployments
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