Skip to content

feat(jpms): add module-info for core/reader/writer [WIP]#176

Draft
dfa1 wants to merge 1 commit into
mainfrom
feat/jpms-module-info
Draft

feat(jpms): add module-info for core/reader/writer [WIP]#176
dfa1 wants to merge 1 commit into
mainfrom
feat/jpms-module-info

Conversation

@dfa1

@dfa1 dfa1 commented Jun 26, 2026

Copy link
Copy Markdown
Owner

Draft / WIP — parking in-progress JPMS adoption. Do not merge yet.

Adds module-info.java to the three published library modules, now unblocked by the in-house fbs/proto toolchain (ADR 0017 removed the flatbuffers-java split package).

Done & green

Module Status
core Modular, clean build, 359 tests pass. Exports model/error/io; compute + generated fbs/proto codecs qualified-exported to reader/writer. requires static java.compiler (SOURCE-retention @Generated on proto records).
reader Modular, clean build, 857 tests pass. requires transitive core + java.net.http (HttpClient is public API); requires static zstd (optional, automatic module). uses/provides EncodingDecoder.
writer (main) Modular, clean build. requires transitive core; requires static zstd. uses/provides EncodingEncoder + ExtensionEncoder. Does not require reader (architecture rule preserved).

Narrow @SuppressWarnings("exports") on ArrayStats.fromFbs and VariantData — both are intentional public entry points taking a generated wire type that core only qualified-exports. Module-name lint suppressed for the group-derived terminal digit (dfa1) and the zstd automatic module.

Known-incomplete (the blocker)

Writer test sourceset fails under -Werror. Writer tests decode-verify round-trips using test-scope reader types, but they patch into the writer module which correctly does not require reader. Added testCompile --add-reads=ALL-MODULE-PATH + surefire useModulePath=false; a residual exports/reads lint warning remains. Needs a clean way to let the test module read reader without polluting the main module graph.

Notes

  • Downstream modules (calcite/cli/csv/jdbc/parquet/inspector) intentionally stay non-modular and consume these as automatic modules via the classpath.
  • The zstd dependency resolves as an automatic module named zstd; the platform-native classifier jars derive invalid module names — fine on the classpath, but a future hazard if anything forces them onto the module path. Long-term fix: add Automatic-Module-Name to the zstd artifacts.

🤖 Generated with Claude Code

Adds JPMS descriptors to the three published library modules now that the
in-house fbs/proto toolchain removed the flatbuffers-java split-package blocker
(ADR 0017).

State:
- core: modular, builds clean, 359 tests green. Exports model/error/io; compute
  and the generated fbs/proto codecs qualified-exported to reader/writer.
  requires static java.compiler (SOURCE-retention @generated on proto records).
- reader: modular, builds clean, 857 tests green. requires transitive core +
  java.net.http (HttpClient in public API); requires static zstd (optional,
  automatic module). uses/provides EncodingDecoder.
- writer: main modular, builds clean. requires transitive core; requires static
  zstd. uses/provides EncodingEncoder + ExtensionEncoder. Does NOT require reader
  (architectural rule preserved).

Narrow @SuppressWarnings("exports") on ArrayStats.fromFbs and VariantData: both
are intentional public entry points that take a generated wire type core only
qualified-exports. Module name lint suppressed for the group-derived terminal
digit (dfa1) and the zstd automatic module.

KNOWN-INCOMPLETE: writer test sourceset fails under -Werror. Writer tests
decode-verify round-trips via test-scope reader types, but tests patch into the
writer module which (correctly) does not require reader. Added testCompile
--add-reads=ALL-MODULE-PATH + surefire useModulePath=false, still resolving a
residual exports/reads lint warning. Downstream modules (calcite/cli/etc.) are
left non-modular and consume these as automatic modules via the classpath.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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