-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HHH-14858 - Implement JRT Module Readers #4265
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know much about the JRT format, but lgtm
Maybe a test would be a good idea? :) |
Yeah definitely - difficult to do though as you need a 100% module-info chain to create a native runtime, and gradle is not quite there yet with jlink, jpackage and jmod support Hmm, can fong the test though, as it's just a URL handler with a string extract - will get one in for you @yrodiere, but without building a JLink/JMod package, you never see the JRT filesystem ;) Would this be acceptable or do we need a non-flaky non-fudged test xD Can I do something like we did for Jackson? (https://github.com/FasterXML/jackson-jdk11-compat-test) I had to create a separate project that builds up the JLink artifact, and then executes the tests through the native runtime to replicate all JRT related issues (being a fully read only filesystem) |
That seems awfully complicated; no, I don't think this is worth creating a new module and trying to use jlink. But There already is a module that runs tests in the modulepath: Maybe that won't reliably test that your use case is addressed, but at least this will check that your implementation successfully retrieves entries from |
I definitely agree with you that's it is awfully complicated :) What we are looking at here is similar to this https://stackoverflow.com/questions/54140750/java-nio-cant-read-files-from-jrt-image - except it's a jar archive read instead of an Io resource read I'm creating a |
...te-core/src/main/java/org/hibernate/boot/archive/internal/JRTFileBasedArchiveDescriptor.java
Outdated
Show resolved
Hide resolved
...te-core/src/main/java/org/hibernate/boot/archive/internal/JRTFileBasedArchiveDescriptor.java
Outdated
Show resolved
Hide resolved
...te-core/src/main/java/org/hibernate/boot/archive/internal/JRTFileBasedArchiveDescriptor.java
Outdated
Show resolved
Hide resolved
...te-core/src/main/java/org/hibernate/boot/archive/internal/JRTFileBasedArchiveDescriptor.java
Show resolved
Hide resolved
recreating under correct commit strategy with test cases |
This PR allows reading the JRT virtual file system, which uses a new URL format structure to reference to files located in the module VFS