pgjdbc/pgjdbc GitHub issues and pull requests (mirror)  
help / color / mirror / Atom feed
From: vlsi (@vlsi) <[email protected]>
To: pgjdbc/pgjdbc <[email protected]>
Subject: Re: [pgjdbc/pgjdbc] PR #3607: Copr: Use Java 21 as the build dependency
Date: Mon, 28 Apr 2025 14:56:46 +0000
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>

This is funny and not so funny at the same time:

```
* What went wrong:
Execution failed for task ':postgresql:compileJava'.
> Compilation failed; see the compiler output below.
  warning: [options] source value 8 is obsolete and will be removed in a future release
  warning: [options] target value 8 is obsolete and will be removed in a future release
  warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
  error: warnings found and -Werror specified
```

@mkoncek , could you add the following as well?

```diff
--- a/build-logic/jvm/src/main/kotlin/build-logic.java.gradle.kts
+++ b/build-logic/jvm/src/main/kotlin/build-logic.java.gradle.kts
@@ -62,6 +62,11 @@ tasks.configureEach<JavaCompile> {
                 }
             }
         )
+        if (buildParameters.jdkBuildVersion >= 21 && buildParameters.targetJavaVersion < 11) {
+            // We know target Java 8 is deprecated with Java 21, so silence the warning
+            // otherwise the build fails due to -Werror below
+            compilerArgs.add("-Xlint:-options")
+        }
         if (!buildParameters.enableCheckerframework) {
             compilerArgs.add("-Xlint:deprecation")
         } else {
```

view thread (11+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: github://pgjdbc/pgjdbc
  Cc: [email protected], [email protected]
  Subject: Re: [pgjdbc/pgjdbc] PR #3607: Copr: Use Java 21 as the build dependency
  In-Reply-To: <<[email protected]>>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox