You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gluten.apache.org by yu...@apache.org on 2026/03/19 09:17:42 UTC

(gluten) branch main updated: [INFRA] Fix Scala 2.13 build on JDK 8 by using release 8 instead of 1.8 (#11784)

This is an automated email from the ASF dual-hosted git repository.

yuanzhou pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/gluten.git


The following commit(s) were added to refs/heads/main by this push:
     new e7ff318463 [INFRA] Fix Scala 2.13 build on JDK 8 by using release 8 instead of 1.8 (#11784)
e7ff318463 is described below

commit e7ff318463ff2e2cf3b72601ddd7c7be35631bb6
Author: Mingliang Zhu <zh...@gmail.com>
AuthorDate: Thu Mar 19 17:17:36 2026 +0800

    [INFRA] Fix Scala 2.13 build on JDK 8 by using release 8 instead of 1.8 (#11784)
    
    Fix build error under JDK 8 and Scala 2.13:
    
    [ERROR] scalac error: '1.8' is not a valid choice for '-release'
    [INFO]   scalac -help  gives more information
    [ERROR] scalac error: bad option: '-release:1.8'
    [INFO]   scalac -help  gives more information
    [ERROR] exception compilation error occurred!!!
    org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
---
 pom.xml | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/pom.xml b/pom.xml
index e87df56738..f6b10ba991 100644
--- a/pom.xml
+++ b/pom.xml
@@ -97,6 +97,7 @@
     <os.full.name>unknown</os.full.name>
     <!-- To build built-in backend c++ codes -->
     <scala.recompile.mode>all</scala.recompile.mode>
+    <scala.release.version>${java.version}</scala.release.version>
     <!-- For unit tests -->
     <fasterxml.version>2.15.0</fasterxml.version>
     <junit.version>4.13.1</junit.version>
@@ -1030,7 +1031,7 @@
                   <arg>-deprecation</arg>
                   <arg>-feature</arg>
                   <arg>-explaintypes</arg>
-                  <arg>-release:${java.version}</arg>
+                  <arg>-release:${scala.release.version}</arg>
                   <arg>-Wconf:any:e</arg>
                   <arg>-Wconf:cat=deprecation:wv</arg>
                   <arg>-Wunused:imports</arg>
@@ -1099,9 +1100,7 @@
       </activation>
       <properties>
         <java.version>1.8</java.version>
-        <!-- scala-maven-plugin 4.9.2 injects '-release 1.8' into scalac args,
-             which fails under JDK 8. Pin to 4.8.0 where this bug does not exist. -->
-        <scala.compiler.version>4.8.0</scala.compiler.version>
+        <scala.release.version>8</scala.release.version>
       </properties>
     </profile>
     <profile>


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org