-
Notifications
You must be signed in to change notification settings - Fork 57
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
missing jspecify dependency in refaster recipes documentation #297
Comments
The next release of openrewrite/rewrite will see rewrite-core bring in jspecify transitively; we figured that would be easiest, but still need to do that likely patch release somewhere this week. That would then also remove the need to add I'm not seeing lombok referenced on the page you linked above. Did I miss anything? |
We just released a new version of OpenRewrite which should have solved this issue already: Since I'm not seeing any lombok references I'm going to proactively close this issue. If I missed anything let me know! |
@timtebeek Thanks, I'm always surprised by how fast this projects reacts and releases new versions. The lombok annotation processor is referenced here: rewrite-docs/authoring-recipes/refaster-recipes.md Lines 136 to 140 in 93527d3
I'm not exactly sure what to make of that, but you may want to make it consistent, one way or another. :) |
Ah that makes sense why I didn't find it initially with a quick search, thanks! I think it might be best to keep it there, as we do recommend lombok for For Gradle there's less of a need to list lombok, as there's no need to edit the same maven compiler plugin configuration block if lombok were to be added to a Gradle project already using our refaster support. |
The main repo recently added jspecify: openrewrite/rewrite#4418. That leads to transitive dependencies. Creating a custom template based recipe following https://docs.openrewrite.org/authoring-recipes/refaster-recipes therefore fails with compile errors for the generated code, specifically the places using the jspecify annotations.
What is the smallest, simplest way to reproduce the problem?
Just have a pom.xml with the contents from https://docs.openrewrite.org/authoring-recipes/refaster-recipes and a trivial recipe.
What is the full stack trace of any errors you encountered?
To fix this, it's sufficient to add
Are you interested in contributing a fix to OpenRewrite?
No. I'm not sure whether the documentation should be updated to just include that dependency (for both gradle and maven builds), or whether something can be done to explicitly re-export the dependency already from the rewrite core module.
Side note: If the documentation is going to be updated, then you may want to think about removing the lombok annotation processor from the same page. It's not needed AFAIK.
The text was updated successfully, but these errors were encountered: