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

Add Moditect, source module info, to allow Kotlin module usage with Java Module system #385

Closed
cowtowncoder opened this issue Oct 13, 2020 · 6 comments
Assignees
Labels
2.12 Issue affecting version 2.12 good first issue Issue that seems easy to resolve and is likely a good candidate for contributors new to project hacktoberfest Issue related to Hactoberfest2020 activities, eligible for additional rewards
Milestone

Comments

@cowtowncoder
Copy link
Member

Since Jackson does not require Java 9 (or higher baseline), module system can not be used to create module-info.class.
But most Jackson components/modules are using Moditect (https://github.com/moditect/moditect) -- support added in 2.11 -- to produce necessary metadata even when building using Java 8 tools.
It would be good to add necessary build support to Kotlin module too.

This issue:

FasterXML/jackson-databind#2273

can show what is needed; basic addition would be:

  1. Add src/moditect/module-info.java with dependency definitions (see Joda module's file, f.ex: https://github.com/FasterXML/jackson-datatype-joda/blob/2.12/src/moditect/module-info.java )
  2. Add plugin invocation in pom.xml (see https://github.com/FasterXML/jackson-datatype-joda/blob/2.12/pom.xml#L106 )

with appropriate modifications -- mostly, need to know Kotlin core module's JPMS coordinates.

@cowtowncoder cowtowncoder added good first issue Issue that seems easy to resolve and is likely a good candidate for contributors new to project 2.12 Issue affecting version 2.12 hacktoberfest Issue related to Hactoberfest2020 activities, eligible for additional rewards labels Oct 13, 2020
@cowtowncoder
Copy link
Member Author

Good Hacktoberfest issue too probably.

cc @GedMarc who is the Moditect/module-info wizard.

@GedMarc
Copy link

GedMarc commented Oct 14, 2020

I'll see if I can setup a base with the kotlin coordinates

@dinomite dinomite self-assigned this Oct 20, 2020
@dinomite dinomite added this to the 2.12.0 milestone Oct 20, 2020
@dinomite
Copy link
Member

@GedMarc Excited to see this, let me know if you need any help. I haven't actually anything with modules yet…but maybe I can be useful eyes?

@cowtowncoder
Copy link
Member Author

I think we have a test suite:

https://github.com/FasterXML/jackson-jdk11-compat-test

which might also help in verification.

@GedMarc
Copy link

GedMarc commented Oct 22, 2020

The module info looks like so - kotlin needs base + desktop

I'll look at getting it into the module and the test cases

module com.fasterxml.jackson.kotlin {
    requires java.base;
    requires java.desktop;
    requires kotlin.stdlib;

   requires com.fasterxml.jackson.databind;
   requires com.fasterxml.jackson.annotations;
}

@UkonnRa
Copy link

UkonnRa commented Dec 29, 2020

Hi, I met this issue, just wondering have you met the same one? #402

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.12 Issue affecting version 2.12 good first issue Issue that seems easy to resolve and is likely a good candidate for contributors new to project hacktoberfest Issue related to Hactoberfest2020 activities, eligible for additional rewards
Projects
None yet
Development

No branches or pull requests

4 participants