Skip to content
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

Support Java Modules #727

Closed
aalmiray opened this issue Apr 27, 2023 · 4 comments · Fixed by #728
Closed

Support Java Modules #727

aalmiray opened this issue Apr 27, 2023 · 4 comments · Fixed by #728

Comments

@aalmiray
Copy link
Contributor

v2.4.4 defines an automatic module name

$ jarviz module name --gav com.networknt:json-schema-validator:1.0.8
subject: json-schema-validator-1.0.8.jar
name: json.schema.validator
source: filename
automatic: true
valid: true

$ jarviz module descriptor --gav com.networknt:json-schema-validator:1.0.8
subject: json-schema-validator-1.0.8.jar
name: json.schema.validator
version: 1.0.8
open: false
automatic: true
requires:
  java.base mandated
contains:
  com.networknt.schema
  com.networknt.schema.url

$ jarviz bytecode show --gav com.networknt:json-schema-validator:1.0.8
subject: json-schema-validator-1.0.8.jar
Unversioned classes. Bytecode version: 50 (Java 6) total: 72

I'd be great if the library supplied a full Java module descriptor. It's possible to keep bytecode baseline compatible with Java 8 while providing a full module descriptor thanks to ModiTect. This will help modular projects that consume this library, specifically those that create custom Java Runtimes with jlink, as the latter does not support automatic modules but explicit modules. If interested I can send a PR to make it happen.

@aalmiray
Copy link
Contributor Author

Depends on ethlo/itu#14

@stevehu
Copy link
Contributor

stevehu commented Apr 27, 2023

@aalmiray I am open to adding module support for the current Java 8 release package. FYI, @fdutton and I have discussed having two branches once we finish the validator implementations.

@aalmiray
Copy link
Contributor Author

@stevehu Thanks! I did notice #562 before submitting this issue. Figured it was best to ask 😅
Would you accept a PR configuring ModiTect to solve this feature?

@stevehu
Copy link
Contributor

stevehu commented Apr 27, 2023

Yes. Let's do that before we have the two branches. Thanks a lot for your help.

aalmiray added a commit to aalmiray/json-schema-validator that referenced this issue Apr 27, 2023
Resolves networknt#727

Signed-off-by: Andres Almiray <aalmiray@gmail.com>
stevehu pushed a commit that referenced this issue Apr 29, 2023
Resolves #727

Signed-off-by: Andres Almiray <aalmiray@gmail.com>
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 a pull request may close this issue.

2 participants