Repository navigation
feat: Declare the client as a module, and name the other modules after their root packages. - #16
Merged
Merged
Conversation
…system. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Hc2MPSLu7HDHTm8HiBsrDz
…ule path only need to require it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Hc2MPSLu7HDHTm8HiBsrDz
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.
Gives all three modules stable names for the Java module system, named after their root packages. Before, Java derived the names from the file names of the jars (
eventsourcingdb,eventsourcingdb.testcontainers,eventsourcingdb.spring.boot.starter). Those names change when a file is renamed, and they would have been fixed by the first publication.What changes
io.thenativeweb.eventsourcingdb): It now declares itself in amodule-info.java.java.net.http,org.jspecifyandtools.jackson.databindtransitively, since its API uses their types.requires io.thenativeweb.eventsourcingdb;.Automatic-Module-Name, it would need three: an automatic module does not pass on its dependencies. Withoutrequires tools.jackson.databind;the application failed withClassNotFoundException: tools.jackson.databind.JsonNode, and withoutrequires java.net.http;withNoClassDefFoundError: java/net/http/HttpClient.io.thenativeweb.eventsourcingdb.testcontainers) and starter (io.thenativeweb.eventsourcingdb.springboot): These setAutomatic-Module-Namein their manifests. They can not declare themselves in amodule-info, since Testcontainers and Spring Boot do not either, and javac warns about requiring such modules (-Xlint:allwith-Werror).Verification
make qapasses from a clean build (191 + 13 + 10 tests, 100% coverage). Gradle keeps running the tests on the classpath, so the tests do not cover the module boundaries; the compiler does.jar --describe-moduleshows the three names. For the two automatic modules, it shows the same name after renaming the jar.requires io.thenativeweb.eventsourcingdb;only. Against a real EventSourcingDB, it wrote an event, read it back and verified its hash.🤖 Generated with Claude Code
https://claude.ai/code/session_01Hc2MPSLu7HDHTm8HiBsrDz