The backport is needed. We have failed builds in 10.x branch using old
gradle infrastructure.
I will apply my "remove" option fix.
Uwe
Am 15.06.2025 um 10:30 schrieb Uwe Schindler:
Hi Dawid,
I'd prefer that solution, should I commit?:
build-tools/build-infra/src/main/groovy/lucene.java.core.mrjar.gradle
| 2 ++
build-tools/build-infra/src/main/groovy/lucene.java.javac.gradle
| 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git
a/build-tools/build-infra/src/main/groovy/lucene.java.core.mrjar.gradle
b/build-tools/build-infra/src/main/groovy/lucene.java.core.mrjar.gradle
index 60a4588ba2d..227669c6d04 100644
---
a/build-tools/build-infra/src/main/groovy/lucene.java.core.mrjar.gradle
+++
b/build-tools/build-infra/src/main/groovy/lucene.java.core.mrjar.gradle
@@ -43,6 +43,8 @@ configure(project(":lucene:core")) {
"--add-exports",
"java.base/jdk.incubator.vector=ALL-UNNAMED",
]
+ // hack because -Xlint:-options does not work for all options
(bug in JDK?):
+ options.compilerArgs.remove("-Werror")
def argsProvider = objects.newInstance(CompilerArgsProvider)
argsProvider.apiJarFile.set(apijar)
diff --git
a/build-tools/build-infra/src/main/groovy/lucene.java.javac.gradle
b/build-tools/build-infra/src/main/groovy/lucene.java.javac.gradle
index 67aaf29c7a4..8f20d9c030b 100644
--- a/build-tools/build-infra/src/main/groovy/lucene.java.javac.gradle
+++ b/build-tools/build-infra/src/main/groovy/lucene.java.javac.gradle
@@ -81,7 +81,7 @@ tasks.withType(JavaCompile).configureEach {
// proc:none was added because of LOG4J2-1925 / JDK-8186647
options.compilerArgs += ["-proc:none"]
- if (failOnWarningsOption.get() &&
(rootProject.ext.runtimeJavaVersion < JavaVersion.VERSION_25)) {
+ if (failOnWarningsOption.get()) {
options.compilerArgs += "-Werror"
}
}
But this is indeed a regression in JDK 25, I can look into reporting
it. We clearly pass the correct command line parameter to prevent
"options" warning to trigger, but in the past I have seen similar
failures also for other command line options. It looks like the
"-options" is not always applied.
We may need to backport this fix, it just hasn't shown up on 10.x
branch. The reason why it appeared was that I updated Java 25 to RC
candidate and added Java 26 yesterday afternoon-
Uwe
Am 15.06.2025 um 09:07 schrieb Uwe Schindler:
I think it would be enough to only add that command line parameter
unconditionally only to the MR-JAR compilation stuff and remove it
from main javac definitions.
Uwe
Am 15.06.2025 um 08:56 schrieb Uwe Schindler:
Your analysis is right. Let's just suppress that warning for the
MR-JAR compilation. I already disables more stuff.
Uwe
Am 14.06.2025 um 23:13 schrieb Dawid Weiss:
This... is weird. It complains when compiling against new Java, for
example:
./gradlew compileMain24Java -Pruntime.java.home=/jdks/jdk-25+27
--rerun-tasks
the problem is this:
warning: [options] location of system modules is not set in
conjunction with -source 24
not setting the location of system modules may lead to class
files that cannot run on JDK 24
--release 24 is recommended instead of -source 24 -target 24
because it sets the location of system modules automatically
error: warnings found and -Werror specified
but we do set:
-Xlint:-options
so I'm not sure why this warning is even triggered. We also can't
use --release because we do some other tweaks to java.base in
lucene.java.core.mrjar.gradle.
I haven't had the time to try to track if it's a jdk regression.
Dawid
On Sat, Jun 14, 2025 at 10:13 PM Policeman Jenkins Server
<jenk...@thetaphi.de> wrote:
Build:
https://jenkins.thetaphi.de/job/Lucene-nightly-main-Linux/263/
Java: 64bit/hotspot/jdk-25-ea+27 -XX:-UseCompressedOops
-XX:+UseParallelGC
No tests ran.
---------------------------------------------------------------------
To unsubscribe, e-mail: builds-unsubscr...@lucene.apache.org
For additional commands, e-mail: builds-h...@lucene.apache.org
--
Uwe Schindler
Achterdiek 19, D-28357 Bremen
https://www.thetaphi.de
eMail:u...@thetaphi.de
--
Uwe Schindler
Achterdiek 19, D-28357 Bremen
https://www.thetaphi.de
eMail:u...@thetaphi.de
--
Uwe Schindler
Achterdiek 19, D-28357 Bremen
https://www.thetaphi.de
eMail:u...@thetaphi.de
--
Uwe Schindler
Achterdiek 19, D-28357 Bremen
https://www.thetaphi.de
eMail:u...@thetaphi.de