Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Copr: Use Java 21 as the build dependency#3607

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
vlsi merged 2 commits intopgjdbc:masterfrommkoncek:master
Apr 29, 2025
Merged

Conversation

mkoncek
Copy link
Contributor

@mkoncekmkoncek commentedApr 16, 2025
edited
Loading

Fixes:#3591

All Submissions:

  • Have you followed the guidelines in ourContributing document?
  • Have you checked to ensure there aren't other openPull Requests for the same update/change?

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?

praiskup reacted with rocket emoji
@mkoncek
Copy link
ContributorAuthor

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

@davecramer
Copy link
Member

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

is that why it is failing ?

@mkoncek
Copy link
ContributorAuthor

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.

@vlsi
Copy link
Member

It does not seem to fix the failure

@mkoncek
Copy link
ContributorAuthor

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 atthis log 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-commandUpdating and loading repositories: updates                                100% | 778.3 KiB/s |  25.7 KiB |  00m00s fedora                                 100% | 314.5 KiB/s |  28.0 KiB |  00m00sRepositories loaded.Failed to resolve the transaction:No match for argument: java-17-openjdk-develYou can try to add to command line:  --skip-unavailable to skip unavailable packagesWARNING: DNF5 command failed, retrying, attempt #2, sleeping 10s

@mkoncekmkoncekforce-pushed themaster branch 2 times, most recently from1db1721 toad4e33cCompareApril 28, 2025 12:44
@mkoncek
Copy link
ContributorAuthor

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.

@vlsi
Copy link
Member

vlsi commentedApr 28, 2025
edited
Loading

@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.

@vlsi
Copy link
Member

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?

--- 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 {

@mkoncek
Copy link
ContributorAuthor

Sure.

@vlsi
Copy link
Member

Wow. So much fun. It finally worked!

@vlsivlsi merged commit475812b intopgjdbc:masterApr 29, 2025
16 of 17 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

The Fedora CI seems to fail
3 participants
@mkoncek@davecramer@vlsi

[8]ページ先頭

©2009-2025 Movatter.jp