Repository navigation
Add a real JPMS module descriptor: com.github.zrdj.java.primitives - #24
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
src/main/java/module-info.javadeclaringmodule com.github.zrdj.java.primitives, exporting all twelve packages that hold public types, with norequiresbeyondjava.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 derivesjava.primitivesfrom the jar file name, which lands in thejava.*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-moduleon the 0.4.0 jar shows the module with twelve exports.🤖 Generated with Claude Code