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

Upgrade openjfx to 17 #54

Closed
jsotuyod opened this issue Aug 11, 2022 · 3 comments
Closed

Upgrade openjfx to 17 #54

jsotuyod opened this issue Aug 11, 2022 · 3 comments
Labels
dependencies Pull requests that update a dependency file enhancement New feature or request
Milestone

Comments

@jsotuyod
Copy link
Member

Running on Mac OSX with a version of JavaFX older than 14 produces garbled text as shown below.

image

In #53 we introduce a check to avoid running unsupported JavaFX versions under Mac OSX, but that currently means it's only possible to develop under Mac OSX by manually changing the referenced JavaFX libraries.

Bumping org.openjfx to 14.0.2.1 fixes this, but unfortunately introduces a number of new issues.

Firstly, the first test to use CodeArea will fail, as internally it will try to animate the text, find that the JFX toolkit was never initialized and incur in a NPE. This is down to internal changes in JavaFX.

Fixing this by manually initializing the platform through Platform.startup(new Runnable() {}) will work locally, but fail in CI, as it can't run in headless mode. Therefore, it seems we need to introduce TestFX to properly support JavaFX testing and headless support.

@jsotuyod jsotuyod added enhancement New feature or request dependencies Pull requests that update a dependency file labels Aug 11, 2022
@oowekyala
Copy link
Member

Thanks for investigating this. I'm not sure we can upgrade and also keep compatibility with older versions of JavaFX, because we use some internal JavaFX APIs, or our dependencies might (eg controlsfx).

About testfx, I found this old commit in master, which may be a starting point: d2e45da

@jsotuyod
Copy link
Member Author

jsotuyod commented Aug 11, 2022

The dependencies for javafx have scope provided, are not shipped in the binary, as we rely on the installed JavaFX of the client (OS dependent). The public API has no changes, bumping the version still builds the code as-is (only regression is on the tests as pointed out). The change only has impact during testing / running from the IDE.

Notice that, in practice, users are already using the designer against newer JavaFX versions (ie: I've used 15, 17 and I'm currently using 18 locally).

@adangel adangel added this to the 7.0.0 milestone Apr 14, 2023
@adangel adangel changed the title Upgrade org.openjfx to 14.0.2.1 to enable development from Mac OSX Upgrade org.openjfx for Mac OS for development on Mac Mar 7, 2024
@adangel adangel changed the title Upgrade org.openjfx for Mac OS for development on Mac Upgrade org.openjfx to 17 Mar 7, 2024
@adangel
Copy link
Member

adangel commented Mar 7, 2024

Firstly, the first test to use CodeArea will fail,

This test has been removed with 0de0b01 , so changing the openjfx version doesn't fail the build anymore (through failing unit tests).

javafx 11 required at least Java 10 (https://github.com/openjdk/jfx/blob/master/doc-files/release-notes-11.md) - the classes are compiled against java 10.

That means, if you use openjfx, you are using anyway at least use java 11 (because java 10 is EOL).

That gives us the option, to update openjfx in general, e.g. up to openjfx 19 still works with Java 11.

I'm going to upgrade openjfx to 17, because that's a LTS version, that seems to be supported for a while (https://gluonhq.com/products/javafx/)

Using the designer built against openjfx 17 still seems to work with Oracle Java 8 with included javafx. Since we don't really build/test against that version, we might see some incompatibilities. But only if someone still really uses (commercial) Java 8.

This upgrade solves the problems with Mac OS X development and makes it easier to develop in general, because you use by default an up-to-date openjfx version with all the bug fixes (e.g. the application icon doesn't work in openjfx 11).

@adangel adangel changed the title Upgrade org.openjfx to 17 Upgrade openjfx to 17 Mar 7, 2024
@adangel adangel closed this as completed in be13091 Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants