Removing spurious dependency from catalyst.impl to the other modules.

nicksrules
Oliver Kennedy 2023-07-13 16:17:39 -04:00
parent 54f855de1a
commit f50de1abb0
Signed by: okennedy
GPG Key ID: 3E5F9B3ABD3FDB60
1 changed files with 24 additions and 25 deletions

View File

@ -106,38 +106,37 @@ object astral extends Module
def scalaVersion = "2.13.8"
def generatedSources = T{ astral.catalyst.rendered() }
def moduleDeps = Seq(astral.compiler, astral.catalyst)
def ivyDeps = Agg(
ivy"org.apache.spark::spark-sql::3.4.1",
)
def internalJavaVersion = T {
try {
val jvm = System.getProperties().getProperty("java.version")
println(f"Running Vizier with `${jvm}`")
jvm.split("\\.")(0).toInt
} catch {
case _:NumberFormatException | _:ArrayIndexOutOfBoundsException =>
println("Unable to retrieve java version. Guessing 11+")
11
}
}
def internalJavaVersion = T {
try {
val jvm = System.getProperties().getProperty("java.version")
println(f"Running Catalyst lite with `${jvm}`")
jvm.split("\\.")(0).toInt
} catch {
case _:NumberFormatException | _:ArrayIndexOutOfBoundsException =>
println("Unable to retrieve java version. Guessing 11+")
11
}
}
def forkArgs = T {
if(internalJavaVersion() >= 11){
Seq(
// Required on Java 11+ for Arrow compatibility
// per: https://spark.apache.org/docs/latest/index.html
"-Dio.netty.tryReflectionSetAccessible=true",
def forkArgs = T {
if(internalJavaVersion() >= 11){
Seq(
// Required on Java 11+ for Arrow compatibility
// per: https://spark.apache.org/docs/latest/index.html
"-Dio.netty.tryReflectionSetAccessible=true",
// Required for Spark on java 11+
// per: https://stackoverflow.com/questions/72230174/java-17-solution-for-spark-java-lang-noclassdeffounderror-could-not-initializ
"--add-exports", "java.base/sun.nio.ch=ALL-UNNAMED",
"--add-opens", "java.base/sun.nio.ch=ALL-UNNAMED",
)
} else { Seq[String]() }
}
// Required for Spark on java 11+
// per: https://stackoverflow.com/questions/72230174/java-17-solution-for-spark-java-lang-noclassdeffounderror-could-not-initializ
"--add-exports", "java.base/sun.nio.ch=ALL-UNNAMED",
"--add-opens", "java.base/sun.nio.ch=ALL-UNNAMED",
)
} else { Seq[String]() }
}
}
}
}