-
-
Notifications
You must be signed in to change notification settings - Fork 630
build: Bump Kotlin 2.0 -> 2.3, JDK to 23 -> 25, Javafx to 21.0.1 -> 25.0.1, Jackson 2.18.2 -> 2.19.4, JaCoCo 0.8.12 -> 0.8.14, attach 4.0.17 -> 4.0.24 #1455
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
Conversation
and also modify kotlin compiler jvm target to 21 instead of 17(onle one LTS version lower than current LTS version) and also modify deprecated kotlin API String.toLowercase() to .lowercase()
This comment was marked as outdated.
This comment was marked as outdated.
|
@AlmasB there is one test failed fun `Path`() {
val rect = Rectangle(160.0, 50.0)
val anim = AnimatedPath(rect)
assertThat(anim.getValue(0.0), `is`(Point3D(0.0, 0.13125, 0.0)))
assertThat(anim.getValue(1.0), `is`(Point3D(0.0, 0.0, 0.0)))
assertThat(anim.getValue(0.5), `is`(Point3D(160.0, 50.0, 0.0)))
}Got the solution here while (t < 1.0) {
points[percent++] = Point3D(dummy.translateX, dummy.translateY, 0.0)
t += 0.01
Thread.sleep(10)//add this line, seems like if the time elapsed speed is not matching the transition time, the calculation wont activated...
pt.jumpTo(Duration.seconds(t))
} |
|
Here is the recreation of the bug: public static void main(String... args) throws Exception {
var c = new Circle(10,Color.RED);
var pt = new PathTransition(Duration.seconds(1), new Rectangle(160,50), c);
pt.play();
Thread.sleep(500);//comment out this line, translate X wont changed
pt.jumpTo(Duration.seconds(0.5));
IO.println(c.getTranslateX());//print 160.0, but if comment out the above line, here will be 0.0
}dont know exactly the reason but it works |
AlmasB
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the version bumps, there seem to be a few unrelated changes. Can you have a look at the comments please.
fxgl-controllerinput/src/main/kotlin/com/almasb/fxgl/controllerinput/GameController.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not recall previous tests failing, is this a result of the new PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is because when we upgrade JavaFX version to 25 then it causes this problem
I have recreate the bug by the Java code and test it in JavaFX 25.0.1
and when it failed, we directly run the test and it failed also then here is the recreation of the problem
public static void main(String... args) throws Exception {
var c = new Circle(10,Color.RED);
var pt = new PathTransition(Duration.seconds(1), new Rectangle(160,50), c);
pt.play();
Thread.sleep(500);//comment out this line, translate X wont changed
pt.jumpTo(Duration.seconds(0.5));
IO.println(c.getTranslateX());//print 160.0, but if comment out the above line, here will be 0.0
}basically this code should work as expected
var pt = new PathTransition(Duration.seconds(1), new Rectangle(160,50), c);
pt.play();
pt.jumpTo(Duration.seconds(0.5));
assertEqual(c.getTranslateX() == 160.0);but it failed
it is 0.0, the circle node didnt move at all
but if we add in like this line
Thread.sleep(500);then it works as epected
and I noticed that the CI failed in all three OS(win,mac&linux)
so you may recreate this problem in your machine just using JavaFX 25.0.1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just tested the same code using JavaFX 21.0.1
it works as expected no need to use Thread.sleep
so pretty sure it is the problem of JavaFX
when we upgrade JavaFX from 21.0.1 to 25.0.1
it happens
so any suggestions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| points[percent++] = Point3D(dummy.translateX, dummy.translateY, 0.0) | ||
|
|
||
| t += 0.01 | ||
| Thread.sleep(10)//seems like if the time elapsed speed is not matching the transition time, the calculation wont be activated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, thanks for investigating. This is rarely used, so it sounds fine to have this workaround. Please can you add a comment that this change is due to JavaFX behaviour being different between versions 21 and 25.
…m due to the different behaviors of between JavaFX 25 and previous LTS version 21. Also change README.md file version back to 21.1 since it will be updated to 25 when releasing.


Bump Kotlin to 2.3, JDK to 25, JavaFX to 25.0.1
Upgrade Kotlin compiler jvm target to 21 instead of 17(onle one LTS version lower than current LTS version)
Modify deprecated kotlin API String.toLowercase() to .lowercase() which is required modification for upgrading Kotlin version
this PR should fix #1451