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 #14

Closed
aalmiray opened this issue Apr 27, 2023 · 3 comments · Fixed by #15
Closed

Support Java Modules #14

aalmiray opened this issue Apr 27, 2023 · 3 comments · Fixed by #15

Comments

@aalmiray
Copy link
Contributor

v1.7.2 defines an automatic module name

$ jarviz module name --gav com.ethlo.time:itu:1.7.0
subject: itu-1.7.0.jar
name: itu
source: filename
automatic: true
valid: true

$ jarviz module descriptor --gav com.ethlo.time:itu:1.7.0
subject: itu-1.7.0.jar
name: itu
version: 1.7.0
open: false
automatic: true
requires:
  java.base mandated
contains:
  com.ethlo.time
  com.ethlo.time.internal

$ jarviz bytecode show --gav com.ethlo.time:itu:1.7.0
subject: itu-1.7.0.jar
Unversioned classes. Bytecode version: 52 (Java 8) total: 18

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.

@ethlo
Copy link
Owner

ethlo commented Apr 28, 2023

Hi! Thanks for your request.
This is not something I have any experience with. Do you need the descriptor added and also a version that is Java 8 bytecode compatible?

@aalmiray
Copy link
Contributor Author

Yes, exactly. Both conditions are required. Here's how the PR could look like networknt/json-schema-validator#728

Btw, I could also prepare a GH workfklow for build/test.

@ethlo
Copy link
Owner

ethlo commented Apr 28, 2023

Yes, both options sounds like an improvement to me, thank you!

aalmiray added a commit to aalmiray/itu that referenced this issue Apr 28, 2023
@ethlo ethlo closed this as completed in #15 May 1, 2023
ethlo pushed a commit that referenced this issue May 1, 2023
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