Skip to content
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

Running `org.openrewrite.java.migrate.UpgradeToJava21 should not downgrade jakarta.inject-api dependency, should it? #394

Open
koppor opened this issue Jan 14, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@koppor
Copy link

koppor commented Jan 14, 2024

I ran org.openrewrite.java.migrate.UpgradeToJava21 in moderne.io (https://app.moderne.io/results/gIKdjKpB8)

I scrolled through diff, I found a change inside build.gradle:

-   implementation 'jakarta.inject:jakarta.inject-api:2.0.1'
+   implementation 'jakarta.inject:jakarta.inject-api:1.0.3'

I think, this should not happen, should it?


Side question: Where can I post the wish that moderne should offer a tree like the GitHub file diff (or Octotree)? I really like the UX of GitHub's tree, so that I can quickly see which fles were changed. For large diffs, this is very helpflul.

@koppor koppor added the bug Something isn't working label Jan 14, 2024
@timtebeek
Copy link
Contributor

Where can I post the wish that moderne should offer a tree like the GitHub file diff (or Octotree)? I really like the UX of GitHub's tree, so that I can quickly see which files were changed. For large diffs, this is very helpfull.

Passed on to the team, thanks!

I scrolled through diff, I found a change inside build.gradle

Indeed we ought not to downgrade that dependency; it looks like we might be doing so here

recipeList:
# Add or update the jakarta.inject-api to a maven project. This artifact still uses the javax.inject name space.
- org.openrewrite.java.dependencies.AddDependency:
groupId: jakarta.inject
artifactId: jakarta.inject-api
version: 1.0.3
onlyIfUsing: javax.inject.*
acceptTransitive: true
- org.openrewrite.java.dependencies.UpgradeDependencyVersion:
groupId: jakarta.inject
artifactId: jakarta.inject-api
newVersion: 1.0.3

@timtebeek timtebeek transferred this issue from openrewrite/rewrite-static-analysis Jan 15, 2024
@timtebeek
Copy link
Contributor

We also have these dependencies changed in the recipes here

- org.openrewrite.java.dependencies.AddDependency:
groupId: jakarta.inject
artifactId: jakarta.inject-api
version: latest.release
onlyIfUsing: javax.inject.*
acceptTransitive: true
- org.openrewrite.java.dependencies.UpgradeDependencyVersion:
groupId: jakarta.inject
artifactId: jakarta.inject-api
newVersion: latest.release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Backlog
Development

No branches or pull requests

2 participants