Skip to content

Add a real JPMS module descriptor: com.github.zrdj.java.identifiers - #16

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.identifiers:

  • exports com.github.zrdj.java.identifiers and exports com.github.zrdj.java.identifiers.codecs
  • requires transitive for com.github.f4b6a3.uuid, .ulid, .tsid, .ksuid, because their types appear in the public API (Ulid, Tsid, Ksuid as return types, UuidNamespace/UuidLocalDomain as parameters). All four declare a stable Automatic-Module-Name in their manifests.

Version goes to 0.3.0.

Why

0.2.1 has neither a descriptor nor Automatic-Module-Name, so JPMS derives java.identifiers from the jar file name, which lands in the java.* namespace the JDK reserves. tibbots/bots#27 wants to use Codecs.UUIDBase62() for the webmail token from a JPMS module. Same fix as ZrdJ/java-properties#18.

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

Check

./dev check: 18 tests green. jar --describe-module on the 0.3.0 jar shows the module. javac warns requires transitive directive for an automatic module once per f4b6a3 dependency; that comes from those jars having no real descriptor.

🤖 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.identifiers" - 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 both packages and requiring the four f4b6a3 modules
transitively, since Ulid, Tsid, Ksuid, UuidNamespace and
UuidLocalDomain appear in the public signatures of Identifiers and
Codecs. The version moves to 0.3.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:16
@glaudeee
glaudeee merged commit aa07547 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