-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Jakarta rewrite infrastructure #24584
Conversation
/cc @manovotn, @maxandersen, @radcortez, @Sanne |
You can for instance use the following approach: | ||
|
||
- create a `quarkus-jakarta` copy of your `quarkus` repository | ||
- add a `jakarta` remote to this `quarkus-jakarta` copy: `git remote add jakarta ../quarkus/` |
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.
suggestion:
git worktree add ../quarkus-jakarta
|
||
The active recipes have to be declared in the target POM with a `plugin` block in the `<build><plugins>` section similar to: | ||
|
||
```xml |
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.
could we not avoid all the pom.xml changes by putting this plugin config in parent and have it pickup rewrite.yml
?
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.
That's already what is done for what you can centralize (it's still there several times because of the independent projects).
But as explained in the README, we want to apply different recipes to different pom files so you can't centralize the active recipes.
In any case, it's just a matter of doing a clean afterwards, it should take 5 minutes or so. And it doesn't have any consequences on the build if you don't call the plugin.
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.
ack - its just that if there is a rewrite.yml next to the pom.xml my jbang based runner for rewrite could be used in a parallel and removed need to change each pom.xml ...just add rewrite.yml where needed.
It's failing for me with:
Is that a reasonable clue for you? |
Not really. Which particular project is failing with this error? |
Attaching the full logs: |
OK, so the problem Sanne has is that they released a new version of the rewrite-maven-plugin since I started working on this and it messes things up. |
243f26b
to
27257e4
Compare
Excellent, works fine for me as well now. |
This comment has been minimized.
This comment has been minimized.
27257e4
to
511edcb
Compare
Excellent work @gsmet. Thanks! |
This simplifies things a lot but requires a few adjustments to be able to skip compilation during the run.
Obviously, you need to have a previous build complete so that you have all pieces around. Also you might miss the latest adjustments to OpenRewrite so make sure you do a full build from time to time.
CI was green. I'm force pushing to squash a !fixup commit. |
511edcb
to
4c31674
Compare
Hey @manovotn @Sanne @maxandersen @n1hility @radcortez ,
Here is the promised PR with the Jakarta rewrite infrastructure. It required quite a lot of experiments but I'm quite happy with the result (it looks far more simple in the end than all the experiments I had to do to get to this result). The hardest part was to find a way to apply the changes without ending up with something you can't build anymore as OpenRewrite needs the Maven build to work.
I went until the ArC extension in this first PR. My next step is to be able to build the Hibernate Validator one as it shouldn't be too hard on the HV side but will unblock quite a lot of dependencies as a lot of them are built on the same model and will require the same dependencies for them to work.
It should be far faster now that I figured out a way to orchestrate this thing.
I added a
jakarta/README.md
explaining the general approach and I would be happy to present the approach to you anytime.Note that this requires (but good news, everything is taken care of in the
jakarta/transform.sh
script so you don't have to do anything related to this):maven.test.skip
for the test compilation)Please see the
jakarta/README.md
before experimenting with this as it has a few advices on how to experiment.Let's wait for CI on this one as I had to do some more build fixes in addition to the ones that I already merged. These build fixes are in separate commits.
Questions welcome. Happy to present this work in a call.