Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(deps): update jfx.version to v25 (major) #6158

Merged
merged 1 commit into from
Feb 21, 2025

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jan 26, 2025

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
org.openjfx:javafx-fxml (source) 24-ea+5 -> 25-ea+2 age adoption passing confidence
org.openjfx:javafx-controls (source) 24-ea+5 -> 25-ea+2 age adoption passing confidence
org.openjfx:javafx-graphics (source) 24-ea+5 -> 25-ea+2 age adoption passing confidence
org.openjfx:javafx-base (source) 24-ea+5 -> 25-ea+2 age adoption passing confidence

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about these updates again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot force-pushed the renovate/major-jfx.version branch from 0842e38 to 14430f3 Compare January 31, 2025 17:53
@rishivijayv
Copy link
Contributor

@monperrus Looks like the Extra checks GH action is failing because of compilation issues, as it is unable to locate a couple javafx related modules used in spoon-visualization
Screenshot 2025-02-17 at 5 40 21 PM

I tried to repro this issue locally, and if I use JDK 17, then I get a similar issue for both the original v24 javafx, and for the updated v25.
However, on using JDK 22 or JDK 23, as is suggested in the README.md for spoon-visualization, I am successfully able to compile. Here is a short, truncated, session which illustrates this (for the v25 javafx update)

Failure with JDK 17

$  java -version
openjdk version "17.0.2" 2022-01-18
OpenJDK Runtime Environment (build 17.0.2+8-86)
OpenJDK 64-Bit Server VM (build 17.0.2+8-86, mixed mode, sharing)
$ mvn clean
[INFO] Scanning for projects...
[INFO] 
[INFO] ----------------< fr.inria.gforge.spoon:visualisation >-----------------
[INFO] Building visualisation 1.1
[INFO]   from pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- clean:3.4.0:clean (default-clean) @ visualisation ---
[INFO] Deleting .../spoon-visualisation/target
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.317 s
[INFO] Finished at: 2025-02-17T17:43:57+01:00
[INFO] ------------------------------------------------------------------------
[INFO] 1 goals, 1 executed
$ mvn compile
[INFO] Scanning for projects...
[INFO] 
[INFO] ----------------< fr.inria.gforge.spoon:visualisation >-----------------
[INFO] Building visualisation 1.1
[INFO]   from pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- resources:3.3.1:resources (default-resources) @ visualisation ---
[INFO] Copying 1 resource from src/main/resources to target/classes
[INFO] 
[INFO] --- compiler:3.13.0:compile (default-compile) @ visualisation ---
[WARNING] Can't extract module name from javafx-graphics-25-ea+2-mac-aarch64.jar: Unsupported major.minor version 66.0
[WARNING] Can't extract module name from javafx-base-25-ea+2-mac-aarch64.jar: Unsupported major.minor version 66.0
[WARNING] Can't extract module name from javafx-controls-25-ea+2-mac-aarch64.jar: Unsupported major.minor version 66.0
[WARNING] Can't extract module name from javafx-fxml-25-ea+2-mac-aarch64.jar: Unsupported major.minor version 66.0
[WARNING] *********************************************************************************************************************************************
[WARNING] * Required filename-based automodules detected: [spoon-core-11.2.0.jar]. Please don't publish this project to a public artifact repository! *
[WARNING] *********************************************************************************************************************************************
[INFO] Compiling 16 source files with javac [debug release 17 module-path] to target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] .../spoon-visualisation/src/main/java/module-info.java:[26,24] module not found: javafx.fxml
[ERROR] .../spoon-visualisation/src/main/java/module-info.java:[27,24] module not found: javafx.controls
[INFO] 2 errors 
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.923 s
[INFO] Finished at: 2025-02-17T17:44:02+01:00
[INFO] ------------------------------------------------------------------------
...
$

Success with JDK 22

$ java -version
java version "22.0.2" 2024-07-16
Java(TM) SE Runtime Environment (build 22.0.2+9-70)
Java HotSpot(TM) 64-Bit Server VM (build 22.0.2+9-70, mixed mode, sharing)
$ mvn clean  
[INFO] Scanning for projects...
[INFO] 
[INFO] ----------------< fr.inria.gforge.spoon:visualisation >-----------------
[INFO] Building visualisation 1.1
[INFO]   from pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- clean:3.4.0:clean (default-clean) @ visualisation ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.274 s
[INFO] Finished at: 2025-02-17T17:49:44+01:00
[INFO] ------------------------------------------------------------------------
[INFO] 1 goals, 1 executed
$ git diff
diff --git a/spoon-visualisation/pom.xml b/spoon-visualisation/pom.xml
index 1668da1d4..33d49e9a0 100644
--- a/spoon-visualisation/pom.xml
+++ b/spoon-visualisation/pom.xml
@@ -23,7 +23,7 @@
 
     <properties>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-        <jfx.version>24-ea+5</jfx.version>
+        <jfx.version>25-ea+2</jfx.version>
     </properties>
 
     <build>
$ mvn compile
[INFO] Scanning for projects...
[INFO] 
[INFO] ----------------< fr.inria.gforge.spoon:visualisation >-----------------
[INFO] Building visualisation 1.1
[INFO]   from pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- resources:3.3.1:resources (default-resources) @ visualisation ---
[INFO] Copying 1 resource from src/main/resources to target/classes
[INFO] 
[INFO] --- compiler:3.13.0:compile (default-compile) @ visualisation ---
[WARNING] *********************************************************************************************************************************************
[WARNING] * Required filename-based automodules detected: [spoon-core-11.2.0.jar]. Please don't publish this project to a public artifact repository! *
[WARNING] *********************************************************************************************************************************************
[INFO] Compiling 16 source files with javac [debug release 17 module-path] to target/classes
[INFO] JDK-8318913 workaround: patched module-info.class requires version from [17] to [17] on 2 JDK modules [java.base, java.desktop]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  1.446 s
[INFO] Finished at: 2025-02-17T17:49:53+01:00
[INFO] ------------------------------------------------------------------------
[INFO] 2 goals, 2 executed
$

I tried looking at a couple other PRs (Update to v24 and Update to v23 for example), but unfortunately they were old enough that their build logs have expired so I'm not sure if this step was something new that was added to the Extra checks workflow.

It was the Unsupported major.minor version 66.0 log that I got in the error which pointed me towards this being a JDK issue locally (see this, for eg), but I don't see that in the build on GH (maybe because of truncated logs?)

Is there a way to double check what JDK version we're using when compiling this in the Extra checks GH action? I tried to look at the action source code and it seems NIX_OPTIONS environment variable might have that info, but I'm not quite sure how to access that.

I think the nix file flake.nix is responsible for running commands, but that is entirely new to me, so wanted to be more certain the diagnosis is plausible before going down the wrong avenue.

cc @algomaster99 @I-Al-Istannen

@monperrus
Copy link
Collaborator

monperrus commented Feb 18, 2025 via email

@rishivijayv
Copy link
Contributor

@monperrus Apologies if I miscommunicated, but I was referring to missing logs of the jobs related to the PR for v24 and the v23 updates that seem to have been successfully merged, which I believe are still absent 😅

But something seems to have gone quite wrong with these new batch of runs that were triggered, looks like it's a nixpackage related issue -- perhaps a one time occurrence?

While I was perusing the Actions, however, I did come across this PR (upgrade to jfx v24-ea+27): #6048. This seems to be running a tests job almost every day (link to some past jobs) -- and the ones that I looked at seem to be failing because of the same issue (eg).

It also seems that the NIX_OPTIONS that I was referring to are set in the tests.yml file, and they don't seem to include any JDK versions.

I am not aware if there are well-treaded paths that are taken to solve issues like this, but as a "hacky" test, we can open a dummy PR where we downgrade to v23 (the version in this PR). Based on my local testing, using JDK 17 gives me the same module not found issues, but JDK 22 works. If we do this and get an error in Extra checks again on that PR, then we'll have narrowed down the cause. Does that sound reasonable or are there more systematic approaches?

@I-Al-Istannen
Copy link
Collaborator

@rishivijayv

Extra checks run in the extraChecks nix dev env, which is defined here

spoon/flake.nix

Line 191 in 37ac91b

extraChecks = mkShell system { extraChecks = true; javaVersion = 21; };

@I-Al-Istannen
Copy link
Collaborator

I-Al-Istannen commented Feb 18, 2025

And yes, the error is that the new javafx version seems to be compiled with java 22 now. I guess we would need to bump the extraChecks java runtime to 22? Do we want to do that?

ETA: Can you explain what you mean by

But something seems to have gone quite wrong with these new batch of runs that were triggered, looks like it's a nixpackage related issue -- perhaps a one time occurrence?

@monperrus
Copy link
Collaborator

I guess we would need to bump the extraChecks java runtime to 22? Do we want to do that?

yes.

@rishivijayv
Copy link
Contributor

ETA: Can you explain what you mean by

But something seems to have gone quite wrong with these new batch of runs that were triggered, looks like it's a nixpackage related issue -- perhaps a one time occurrence?

@I-Al-Istannen I was referring to the log for the latest run of Extra checks on this PR, which seemed to have failed a lot earlier this time because of nixpkgs being too old. Another one on Javadoc quality also failed because of this issue. Since Extra checks was not the only one that failed with that issue, I thought this was a more broader "set up" related failure.

It seems like nixpkgs is fetched and set at this point, so the complaint seems like it's saying that version is too old?

There are a few green runs under tests Actions (all of which failed here), which is what makes me think this is probably a one-time issue that will be solved with a re-trigger?

Screenshot 2025-02-19 at 9 09 23 AM

@rishivijayv
Copy link
Contributor

rishivijayv commented Feb 19, 2025

Created a PR for the bump to extraChecks runtime here: #6186 :)

EDIT: But unfortunately looks like OpenJDK 22 reached end of life and has been...removed? 🤔 This leads to failures for the Extra checks and the Javadoc quality checks on that PR.

Screenshot 2025-02-19 at 9 55 03 AM

Anecdotally IIRC, I wasn't able to install openjdk@22 using brew, and had to resort to downloading JDK v22 from here. Maybe we're facing a similar issue here?

Q1: Do we want to try a bump to JDK v23 for the extraChecks runtime then? Looks like it is supported based on the nix file.

Q2: It seems the Spoon README.md says it only supports versions up to JDK v20. Is that outdated documentation or is that only talking about the spoon-core module, which is different from spoon-visualization, the runtime for extraChecks etc?

@I-Al-Istannen
Copy link
Collaborator

which is what makes me think this is probably a one-time issue that will be solved with a re-trigger?

Nope. The flake check action checks that the version of nixpkgs we use isn't too far behind the upstream. You need to update your flake.lock file in those cases, a retrigger will not do anything. renovate syncs the lockfile every week, so this should not happen, unless it is backed up too far and can not create a lock file maintenance PR.

Q1: Do we want to try a bump to JDK v23 for the extraChecks runtime then? Looks like it is supported based on the nix file.

Yes, I would say so.

Q2: It seems the Spoon README.md says it only supports versions up to JDK v20. Is that outdated documentation or is that only talking about the spoon-core module, which is different from spoon-visualization, the runtime for extraChecks etc?

I think that refers to the java code it can analyze (and is probably outdated)

@rishivijayv
Copy link
Contributor

Nope. The flake check action checks that the version of nixpkgs we use isn't too far behind the upstream. You need to update your flake.lock file in those cases, a retrigger will not do anything. renovate syncs the lockfile every week, so this should not happen, unless it is backed up too far and can not create a lock file maintenance PR.

Hmm I see. I think the last flake.lock maintenance by renovate was in #6181, and looks like this PR wasn't updated with the master changes for about 3 weeks, which probably caused nixpkg to become out of date here in the latest run that was triggered 🤔

FWIW #6186 did not face these issues, so I feel updating this branch/PR with master changes and then a re-trigger should fix this issue? 🤔

@renovate renovate bot force-pushed the renovate/major-jfx.version branch from 14430f3 to 36951f2 Compare February 19, 2025 11:13
@I-Al-Istannen
Copy link
Collaborator

Hmm I see. I think the last flake.lock maintenance by renovate was in #6181, and looks like this PR wasn't updated with the master changes for about 3 weeks, which probably caused nixpkg to become out of date here in the latest run that was triggered 🤔

The renovate dashboard shows an error related to nixpkgs, but I am not sure how to clear it :P It merged the next lockfile maintenance PR, so the error can probably be ignored now...

FWIW #6186 did not face these issues, so I feel updating this branch/PR with master changes and then a re-trigger should fix this issue? 🤔

Renovate should do this automatically, but I triggered a manual rebase :) We will need to do that again after merging the jdk bump though.

@renovate renovate bot force-pushed the renovate/major-jfx.version branch from 36951f2 to a38ad34 Compare February 20, 2025 06:00
@monperrus
Copy link
Collaborator

rebased. now this is green.

let's proceed with merge?

@monperrus monperrus merged commit df722cb into master Feb 21, 2025
14 checks passed
@renovate renovate bot deleted the renovate/major-jfx.version branch February 21, 2025 06:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants