pgjdbc/pgjdbc GitHub issues and pull requests (mirror)  
help / color / mirror / Atom feed
[pgjdbc/pgjdbc] PR #3607: Copr: Use Java 21 as the build dependency
11+ messages / 3 participants
[nested] [flat]

* [pgjdbc/pgjdbc] PR #3607: Copr: Use Java 21 as the build dependency
@ 2025-04-16 06:32 "mkoncek (@mkoncek)" <[email protected]>
  0 siblings, 0 replies; 11+ messages in thread

From: mkoncek (@mkoncek) @ 2025-04-16 06:32 UTC (permalink / raw)
  To: pgjdbc/pgjdbc <[email protected]>

Fixes: #3591

### All Submissions:

* [ ] Have you followed the guidelines in our [Contributing](https://github.com/pgjdbc/pgjdbc/blob/master/CONTRIBUTING.md) document?
* [ ] Have you checked to ensure there aren't other open [Pull Requests](../../pulls) for the same update/change?

<!-- You can erase any parts of this template not applicable to your Pull Request. -->

### New Feature Submissions:

1. [ ] Does your submission pass tests?
2. [ ] Does `./gradlew styleCheck` pass ?
3. [ ] Have you added your new test classes to an existing test suite in alphabetical order?

### Changes to Existing Features:

* [ ] Does this break existing behaviour? If so please explain.
* [ ] Have you added an explanation of what your changes do and why you'd like us to include them?
* [ ] Have you written new tests for your core changes, as applicable?
* [ ] Have you successfully run tests with your changes locally?


^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: [pgjdbc/pgjdbc] PR #3607: Copr: Use Java 21 as the build dependency
@ 2025-04-17 07:52 ` "mkoncek (@mkoncek)" <[email protected]>
  9 siblings, 0 replies; 11+ messages in thread

From: mkoncek (@mkoncek) @ 2025-04-17 07:52 UTC (permalink / raw)
  To: pgjdbc/pgjdbc <[email protected]>

As this is not a code change, i did not execute any build locally.

^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: [pgjdbc/pgjdbc] PR #3607: Copr: Use Java 21 as the build dependency
@ 2025-04-17 10:31 ` "davecramer (@davecramer)" <[email protected]>
  9 siblings, 0 replies; 11+ messages in thread

From: davecramer (@davecramer) @ 2025-04-17 10:31 UTC (permalink / raw)
  To: pgjdbc/pgjdbc <[email protected]>

> As this is not a code change, i did not execute any build locally.

is that why it is failing ?

^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: [pgjdbc/pgjdbc] PR #3607: Copr: Use Java 21 as the build dependency
@ 2025-04-17 11:28 ` "mkoncek (@mkoncek)" <[email protected]>
  9 siblings, 0 replies; 11+ messages in thread

From: mkoncek (@mkoncek) @ 2025-04-17 11:28 UTC (permalink / raw)
  To: pgjdbc/pgjdbc <[email protected]>

> is that why it is failing ?

I am 99 % sure, though I am not the person who set Copr builds up. It is consistent with the logs, `java-17-openjdk-devel` is installed before the build itself, so it must be configured from here.

^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: [pgjdbc/pgjdbc] PR #3607: Copr: Use Java 21 as the build dependency
@ 2025-04-17 12:24 ` "vlsi (@vlsi)" <[email protected]>
  9 siblings, 0 replies; 11+ messages in thread

From: vlsi (@vlsi) @ 2025-04-17 12:24 UTC (permalink / raw)
  To: pgjdbc/pgjdbc <[email protected]>

It does not seem to fix the failure

^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: [pgjdbc/pgjdbc] PR #3607: Copr: Use Java 21 as the build dependency
@ 2025-04-17 18:04 ` "mkoncek (@mkoncek)" <[email protected]>
  9 siblings, 0 replies; 11+ messages in thread

From: mkoncek (@mkoncek) @ 2025-04-17 18:04 UTC (permalink / raw)
  To: pgjdbc/pgjdbc <[email protected]>

Yeah, I noticed that. My only guess is that the Copr build uses these settings from the master branch, not from PRs.
if you look at [this log](https://download.copr.fedorainfracloud.org/results/@pgjdbc/pgjdbc-ci/srpm-builds/08909844/builder-li...) and the line:
```
 'source_json': {'builddeps': 'git java-17-openjdk-devel python-unversioned-command',
```
that is exactly the content of the file that I am changing in this PR and that is what fails during the Copr build:
```
INFO: installing package(s): git java-17-openjdk-devel python-unversioned-command
Updating and loading repositories:
 updates                                100% | 778.3 KiB/s |  25.7 KiB |  00m00s
 fedora                                 100% | 314.5 KiB/s |  28.0 KiB |  00m00s
Repositories loaded.
Failed to resolve the transaction:
No match for argument: java-17-openjdk-devel
You can try to add to command line:
  --skip-unavailable to skip unavailable packages
WARNING: DNF5 command failed, retrying, attempt #2, sleeping 10s
```

^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: [pgjdbc/pgjdbc] PR #3607: Copr: Use Java 21 as the build dependency
@ 2025-04-28 13:15 ` "mkoncek (@mkoncek)" <[email protected]>
  9 siblings, 0 replies; 11+ messages in thread

From: mkoncek (@mkoncek) @ 2025-04-28 13:15 UTC (permalink / raw)
  To: pgjdbc/pgjdbc <[email protected]>

Now Copr build fails because the Gradle build somehow only accepts Java 17:
```
A problem occurred configuring project ':postgresql'.
> Failed to query the value of task ':postgresql:compileJava' property 'options.release'.
   > Failed to calculate the value of task ':postgresql:compileJava' property 'javaCompiler'.
      > Cannot find a Java installation on your machine (Linux 6.11.8-300.fc41.x86_64 amd64) matching: {languageVersion=17, vendor=any vendor, implementation=vendor-specific}. Toolchain download repositories have not been configured.
```

^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: [pgjdbc/pgjdbc] PR #3607: Copr: Use Java 21 as the build dependency
@ 2025-04-28 13:32 ` "vlsi (@vlsi)" <[email protected]>
  9 siblings, 0 replies; 11+ messages in thread

From: vlsi (@vlsi) @ 2025-04-28 13:32 UTC (permalink / raw)
  To: pgjdbc/pgjdbc <[email protected]>

@mkoncek , we do use Java 17 by default, however, there's an option to adjust it: `./gradlew .. -PjdkBuildVersion=21 ...`
Could you give it a try?

It might be time to go for Java 21 by default for the build though.

^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: [pgjdbc/pgjdbc] PR #3607: Copr: Use Java 21 as the build dependency
@ 2025-04-28 14:56 ` "vlsi (@vlsi)" <[email protected]>
  9 siblings, 0 replies; 11+ messages in thread

From: vlsi (@vlsi) @ 2025-04-28 14:56 UTC (permalink / raw)
  To: pgjdbc/pgjdbc <[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 {
```

^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: [pgjdbc/pgjdbc] PR #3607: Copr: Use Java 21 as the build dependency
@ 2025-04-29 07:11 ` "mkoncek (@mkoncek)" <[email protected]>
  9 siblings, 0 replies; 11+ messages in thread

From: mkoncek (@mkoncek) @ 2025-04-29 07:11 UTC (permalink / raw)
  To: pgjdbc/pgjdbc <[email protected]>

Sure.

^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: [pgjdbc/pgjdbc] PR #3607: Copr: Use Java 21 as the build dependency
@ 2025-04-29 11:19 ` "vlsi (@vlsi)" <[email protected]>
  9 siblings, 0 replies; 11+ messages in thread

From: vlsi (@vlsi) @ 2025-04-29 11:19 UTC (permalink / raw)
  To: pgjdbc/pgjdbc <[email protected]>

Wow. So much fun. It finally worked!

^ permalink  raw  reply  [nested|flat] 11+ messages in thread


end of thread, other threads:[~2025-04-29 11:19 UTC | newest]

Thread overview: 11+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-04-16 06:32 [pgjdbc/pgjdbc] PR #3607: Copr: Use Java 21 as the build dependency "mkoncek (@mkoncek)" <[email protected]>
2025-04-17 07:52 ` "mkoncek (@mkoncek)" <[email protected]>
2025-04-17 10:31 ` "davecramer (@davecramer)" <[email protected]>
2025-04-17 11:28 ` "mkoncek (@mkoncek)" <[email protected]>
2025-04-17 12:24 ` "vlsi (@vlsi)" <[email protected]>
2025-04-17 18:04 ` "mkoncek (@mkoncek)" <[email protected]>
2025-04-28 13:15 ` "mkoncek (@mkoncek)" <[email protected]>
2025-04-28 13:32 ` "vlsi (@vlsi)" <[email protected]>
2025-04-28 14:56 ` "vlsi (@vlsi)" <[email protected]>
2025-04-29 07:11 ` "mkoncek (@mkoncek)" <[email protected]>
2025-04-29 11:19 ` "vlsi (@vlsi)" <[email protected]>

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