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

Improve Java Module system (JPMS) support by Scala module #700

Closed
cowtowncoder opened this issue Jan 23, 2025 · 2 comments
Closed

Improve Java Module system (JPMS) support by Scala module #700

cowtowncoder opened this issue Jan 23, 2025 · 2 comments

Comments

@cowtowncoder
Copy link
Member

So, as part of Jackson 3.0 work, I have converted most modules to use module-info.java as part of build: formerly most modules used Moditect plug-in to just inject lightly processed variant into jar.
This work is under JSTEP-11 (https://github.com/FasterXML/jackson-future-ideas/wiki/JSTEP-11).

It looks like Scala module isn't using Moditect, and perhaps isn't even defining Automatic-Module-Name to define Module name. Given this, it is probably too big a leap to jump to creating and using module-info.java.

But it would nice to improve module metadata in some way: even if just adding Automatic-Module-Name.
This could be done both for 2.19 and 3.0 (master).

@pjfanning
Copy link
Member

closing in favour of #569

JPMS has not really been embraced by the Scala community as far as I can see. Very little discussion of it.

@cowtowncoder
Copy link
Member Author

cowtowncoder commented Jan 23, 2025

Ok but would it at least be possible to add Automatic-Module-Name -- it's just an entry in MANIFEST.MF and provides minimal level?
(see f.ex https://stackoverflow.com/questions/46741907/what-is-an-automatic-module ):

"if the JAR defines the Automatic-Module-Name header in its manifest, it defines the module's name"

I don't expect actual module-info.java if situation really is such that Scala community cares little about JPMS (which I can understand, my own view of JPMS is pretty skeptical).
But automatic module name helps slightly with stability.

For 2.x it'd be I think com.fasterxml.jackson.module.scala and for 3.x tools.jackson.module.scala.

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

No branches or pull requests

2 participants