arrow icon indicating copy to clipboard operation
arrow copied to clipboard

Support the Java platform module system

Open durganmcbroom opened this issue 3 years ago • 3 comments

As the title suggests, Arrow does not support the Java module system. One workaround is to manually patch in arrow as a module, eg:

// build.gradle.kts
tasks.compileJava {
    doFirst {
        val arrowVersion = "1.12.2"

        options.compilerArgs.addAll(
            listOf(
                "--module-path", classpath.asPath,
                "--add-modules", "arrow.core.jvm",
                "--patch-module", "arrow.core.jvm=arrow-core-jvm-$arrowVersion.jar"
            )
        )

        classpath = files()
    }
}

Possible solutions could be:

  • Declare an automatic module name in the Arrow manifest
  • Turn the JVM build into a multi-release jar with a module-info

Thanks!

durganmcbroom avatar Aug 20 '22 20:08 durganmcbroom

For the record, this PR adds support for JPMS for kotlinx.serialization. @durganmcbroom do you think this is a plausible solution for Arrow?

serras avatar Nov 17 '22 10:11 serras

This is the same issue as #2553

serras avatar Nov 17 '22 10:11 serras

The solution discussed in the PR you mentioned looks great!

durganmcbroom avatar Nov 17 '22 17:11 durganmcbroom