Closed wendigo closed 9 months ago
With the ./mvnw clean install -DskipTests -nsu -T 1C -U -Dair.check.skip-enforcer -Dair.check.skip-modernizer
and:
maven-dependency-plugin
with ASM updated to 9.5 works correctlymaven-shade-plugin
with ASM updated to 9.5 works correctly (https://github.com/apache/maven-shade-plugin/pull/184)I was able to compile Trino with JDK 21 as a target.
I'm gonna submit the PR to maven-dependency-plugin
and maven-enforcer-plugin
I've been able to compile and run Trino with mentioned changes on JDK 21:
❯ docker run trino:413-SNAPSHOT-arm64
+ launcher_opts=(--etc-dir /etc/trino)
+ grep -s -q node.id /etc/trino/node.properties
+ launcher_opts+=("-Dnode.id=${HOSTNAME}")
+ exec /usr/lib/trino/bin/launcher run --etc-dir /etc/trino -Dnode.id=f553225d9acc
WARNING: Support for the ARM architecture is experimental
# WARNING: Unable to attach Serviceability Agent. You can try again with escalated privileges. Two options: a) use -Djol.tryWithSudo=true to try with sudo; b) echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope
Apr 13, 2023 10:41:20 AM io.airlift.log.Logger info
INFO: Java version: 21-ea
Querying TPCH works just fine :)
https://github.com/apache/maven-dependency-analyzer
was already upgraded to ASM 9.5 and released so I assume that it will soon land in maven-dependency-plugin
OMG, JDK21 is available 😱
@chenjian2664 it's not ;) Targeted for September but we want to be prepared to switch to it
@wendigo So cool
https://github.com/airlift/airbase/pull/359 fixes maven plugins compatibility
I've just verified that error-prone HEAD works fine with JDK 21 after https://github.com/google/error-prone/pull/3918
diff --git a/pom.xml b/pom.xml
index 3e6fdb8d73..e01e285d30 100644
--- a/pom.xml
+++ b/pom.xml
@@ -60,7 +60,7 @@
<dep.drift.version>1.14</dep.drift.version>
<dep.tempto.version>196</dep.tempto.version>
<dep.gcs.version>2.2.8</dep.gcs.version>
- <dep.errorprone.version>2.19.1</dep.errorprone.version>
+ <dep.errorprone.version>HEAD-SNAPSHOT</dep.errorprone.version>
<dep.testcontainers.version>1.18.3</dep.testcontainers.version>
<dep.duct-tape.version>1.0.8</dep.duct-tape.version>
<dep.coral.version>2.0.153</dep.coral.version>
@@ -206,6 +206,19 @@
<module>testing/trino-tests</module>
</modules>
+ <repositories>
+ <repository>
+ <id>oss.sonatype.org-snapshot</id>
+ <url>https://oss.sonatype.org/content/repositories/snapshots</url>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
+
<dependencyManagement>
<dependencies>
<!-- Trino -->
@@ -2074,6 +2087,7 @@
<exclude>com.google.guava:guava</exclude>
<exclude>com.fasterxml.jackson.core:jackson-core</exclude>
<exclude>com.google.j2objc:j2objc-annotations</exclude>
+ <exclude>com.google.errorprone:error_prone_annotations</exclude>
</excludes>
</requireUpperBoundDeps>
<bannedDependencies>
error-prone HEAD-SNAPSHOT is working with jdk 21
Blocked by https://github.com/trinodb/trino/issues/18272 (it's a regression starting with JDK 20)
Requires https://github.com/trinodb/trino/pull/18931 (dropping HDP2.6 images which are based on Centos6 shipped with old glibc. This prevents installing Temurin JDK 21 and other builds)
Trino 432 now uses Java 21 in the Trino Docker image.
The 0.14.0 release of the Trino Helm charts https://github.com/trinodb/charts now uses Trino 432 and therefore Java 21.
The blog post https://trino.io/blog/2023/11/03/java-21 announces our plans to require Java 21 and asks for feedback and testing reports.
Announced on Trino slack and linkedin as well https://www.linkedin.com/feed/update/urn:li:activity:7126324119733686272
Known problems:
extra-enforcer-rules
does not recognize JDK 21 with theenforceBytecodeVersion
rule (whenproject.build.targetJdk
is set to21
)maven-dependency-plugin
cannot read JDK 21 classesUnsupported class file major version 65
(old ASM is used)modernizer-maven-plugin
cannot read JDK 21 classesUnsupported class file major version 65
(old ASM is used)maven-shade-plugin
cannot shade JDK 21 classesguice
is shading outdated ASMAirlift
to use Virtual Threads forjetty-client
andjetty-server