Skip to content

Add a real JPMS module descriptor: com.github.zrdj.java.primitives - #24

Merged
glaudeee merged 1 commit into
mainfrom
feature/module-descriptor
Oct 18, 2026
Merged

glaudeee merged 1 commit into
mainfrom
feature/module-descriptor

Conversation

@glaudeee

Copy link
Copy Markdown
Contributor

What

Adds src/main/java/module-info.java declaring module com.github.zrdj.java.primitives, exporting all twelve packages that hold public types, with no requires beyond java.base. Version goes to 0.4.0 (the pom still said 0.3.0 although 0.3.1 was released).

Why

Without a descriptor or Automatic-Module-Name, JPMS derives java.primitives from the jar file name, which lands in the java.* namespace the JDK reserves. Same fix as ZrdJ/java-properties#18; part of one sweep over the zrdj libraries, triggered by tibbots/bots using them from JPMS modules.

Decision: .docs/project/decisions/2026-10-18-real-module-descriptor-instead-of-automatic-name.md.

Check

./dev check: 51 tests green. jar --describe-module on the 0.4.0 jar shows the module with twelve exports.

🤖 Generated with Claude Code

The published jar has neither a module-info.class nor an
Automatic-Module-Name entry, so a named module that requires it gets
the name derived from the jar file, "java.primitives" - a name in the
java.* namespace the JDK reserves for platform modules. tibbots/bots
wants to use this library from such a named module.

Ship module-info.java with the module name matching the root package,
exporting all twelve packages, each of which holds public types. The
library has no non-test dependencies and uses only java.base, so the
descriptor needs no requires clause. The version moves to 0.4.0; the
decision record explains why.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@glaudeee
glaudeee requested a review from codejanovic as a code owner October 18, 2026 16:21
@glaudeee
glaudeee merged commit ae8985c into main Oct 18, 2026
5 checks passed
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.

2 participants