Closed cbrautigam2 closed 10 months ago
Gradle Version:
[cbrautigam@vm-cbrautigam tasking-service]$ gradle --version
------------------------------------------------------------
Gradle 8.0.2
------------------------------------------------------------
Build time: 2023-03-03 16:41:37 UTC
Revision: 7d6581558e226a580d91d399f7dfb9e3095c2b1d
Kotlin: 1.8.10
Groovy: 3.0.13
Ant: Apache Ant(TM) version 1.10.11 compiled on July 10 2021
JVM: 11 (Oracle Corporation 11+28)
OS: Linux 4.18.0-372.16.1.el8_6.x86_64 amd64
Thanks for reporting!
Unfortunately unless I can reproduce the problem, I can not do much about it. When I tried the Gradle migration earlier this month, I was able to complete it on a sample project.
I can only recommend to do the migration by hand. OptaPlanner dependencies need to change to Timefold ones, and org.optaplanner
imports need to be replaced by ai.timefold.solver
ones. Find&Replace in the IDE should be able to take care of that.
Ok well that is very unfortunate, I assume nothing has changed in the script or dependencies since you have tried it?
Ok well that is very unfortunate, I assume nothing has changed in the script or dependencies since you have tried it?
Exactly. I'll give it a go later to double-check.
I was just able to migrate this project: https://github.com/kiegroup/optaplanner-quickstarts/tree/8.x/technology/java-spring-boot
------------------------------------------------------------
Gradle 8.3
------------------------------------------------------------
Build time: 2023-08-17 07:06:47 UTC
Revision: 8afbf24b469158b714b36e84c6f4d4976c86fcd5
Kotlin: 1.9.0
Groovy: 3.0.17
Ant: Apache Ant(TM) version 1.10.13 compiled on January 4 2023
JVM: 17.0.8.1 (Eclipse Adoptium 17.0.8.1+1)
OS: Linux 6.5.2-301.fc39.x86_64 amd64
Also succeeded:
java -version
openjdk version "11.0.19" 2023-04-18
OpenJDK Runtime Environment Temurin-11.0.19+7 (build 11.0.19+7)
OpenJDK 64-Bit Server VM Temurin-11.0.19+7 (build 11.0.19+7, mixed mode)
It appears that some OpenRewrite users on other projects have run into similar problems. The solution was to run the migration from the root of the project, not from the subprojects. (No idea if this applies to your use case though.)
yes this is a subproject, i will try running at the root level
Still same problem :(
Looks like the Gradle version is not compatible with the rewrite version. Can you try upgrading from Gradle 8.0.2 to Gradle 8.3 first?
I worked around it by just manually upgrading all package names, and my solverConfig.xml. Perhaps the upgrade script needs to check for a min gradle version for compatibility sake? I can talk to our team about a gradle upgrade, but that has greater impacts as we do build online and offline builds and that kind of change is rather pervasive that needs some buy off.
Shall we close as non-reproducible? Or do we need to validate the minimum gradle version in the migrator somehow?
As we can not reproduce the failure, I'll close it. If more information surfaces, it can be reopened.
Describe the bug I am trying to run the upgrade script to upgrade from Optaplanner 8.x to timefold 0.8. I am using the gradle build instructions here: https://timefold.ai/blog/2023/optaplanner-fork/#upgrade-from-optaplanner-to-timefold. The upgrade failed saying:
Expected behavior The upgrade to work without issue
Actual behavior Got the following output from running the upgrade:
To Reproduce I'm not going to send you our companies spring boot project that caused this issue, but it looks like there is some kind of version issue/conflict being that their seems to be a method signature error.
Environment
Timefold Solver Version or Git ref: 0.8
Output of
java -version
:Output of
uname -a
orver
:Additional information
This is our build.gradle file contents that has optaplanner dependencies: