-
Notifications
You must be signed in to change notification settings - Fork 80
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
RemovalsServletJakarta10 Recipe #338
RemovalsServletJakarta10 Recipe #338
Conversation
Not quite sure what's going on, but I can't seem to get the exception test cases to pass, which use a combination of |
Hi @timtebeek when I run the test with my last changes I see it passing - |
On my machine, and in CI, I'm getting @@ -5,8 +5,8 @@
class Test {
void doGet(HttpServletRequest req, HttpServletResponse res) throws Exception {
jakarta.servlet.Servlet servlet ;
- UnavailableException unavailableEx1 = new UnavailableException("x", 0);
- UnavailableException unavailableEx2 = new UnavailableException("x", 0);
+ UnavailableException unavailableEx1 = new UnavailableException(0, "x");
+ UnavailableException unavailableEx2 = new UnavailableException(0, "x");
UnavailableException unavailableEx3 = new UnavailableException( "x");
}
} I'd like to see this work in CI before a merge; did you refresh your dependencies locally? |
Also; at some point we might want to update the README footer. |
Hi @timtebeek will update the readme soon ..also I ran the same test in my branch ..
and it ran without issues.. I will pull all ur changes next and run to see.. |
@timtebeek seeing the same issues like you ..trying to understand what could have caused this. |
@timtebeek & @joanvr when I ran the debugger with just this
what I noticed is that after calling the DeleteMethodArgument class and getting upto deleting one argument, the test returns and fails instead of going to the next step of ReoderMethodArguments which inturn fails the test. I put breakpoints in ReorderMethodArguments but the code never reached there. |
@joanvr and @timtebeek could you look at this failure? Thanks! |
Figured out why the reordering of arguments isn't yet working: the visitor we use there does not yet support constructors, only method invocations. I'll see if I can add support there, such that we can use that here. |
Now waiting for review and merge of |
I'm going to re-run CI on this PR when it finishes publishing the changes on |
Now that the CI tests pass, what's the status of this PR? is it ready to review/merge? |
@joanvr I feel this can be merged as well.. @timtebeek any updates? Thanks! |
src/main/java/org/openrewrite/java/migrate/jakarta/GetRealPathUpdate.java
Outdated
Show resolved
Hide resolved
src/main/java/org/openrewrite/java/migrate/jakarta/GetRealPathUpdate.java
Outdated
Show resolved
Hide resolved
src/main/java/org/openrewrite/java/migrate/jakarta/GetRealPathUpdate.java
Outdated
Show resolved
Hide resolved
src/main/java/org/openrewrite/java/migrate/jakarta/GetRealPathUpdate.java
Outdated
Show resolved
Hide resolved
src/main/java/org/openrewrite/java/migrate/jakarta/GetRealPathUpdate.java
Outdated
Show resolved
Hide resolved
src/main/java/org/openrewrite/java/migrate/jakarta/UpdateGetRealPath.java
Outdated
Show resolved
Hide resolved
Would be great if we could get these conflicts resolved before a more thorough review and merge. |
Copying the test failure message here to save folks a click
This is a new validation we added recently, meaning the element types aren't quite right yet. When run in the debugger you should be able to spot the old types quite quickly to make the necessary changes. |
Highly unlikely that folks will run these recipes against an old copy of the classes and methods touched here.
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.
The move of the faces recipes complicated the review a bit here, but I think I've resolved all the conflicts correctly now by comparing between jakarta-ee-10.yml
and jakarta-faces-4.yml
. Let me know if I missed any, but that greatly simplfied the review.
Thanks again!
What's changed?
This PR consists of a Jakarta EE 10 migration recipe - RemovalsServletJakarta10. Below is the screenshot of what the rule does:
Anything in particular you'd like reviewers to focus on? -
Update: This is fixed in the latest
I was able to complete all the migrations except
Here I need to be able to remove one argument using org.openrewrite.java.DeleteMethodArgument and then proceed to follow it up with another recipe. Unfortunately outside the test or within the test if I run , it recursively deletes all arguments and does not provide an option to stop after one cycle. In the recipe I have provided the details
and the test has
I would like the above result but without using cycles(1).expectedCyclesThatMakeChanges(1) I dont get the result and that wont work for me since I need to proceed and modify the result further.
Please let me know if you have further questions regarding the issue. Once I get past this I will be able to complete this recipe
Anyone you would like to review specifically?
@timtebeek @joanvr
Have you considered any alternatives or workarounds?
Yes
Any additional context
Checklist
./gradlew licenseFormat