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

java/ChangePackage does not update JPMS module-info.java #4257

Closed
commonquail opened this issue Jun 14, 2024 · 2 comments
Closed

java/ChangePackage does not update JPMS module-info.java #4257

commonquail opened this issue Jun 14, 2024 · 2 comments
Labels
bug Something isn't working parser-java

Comments

@commonquail
Copy link

What version of OpenRewrite are you using?

7b498e6

How are you running OpenRewrite?

Maven plugin with

---
type: specs.openrewrite.org/v1beta/recipe
name: com.yourorg.ChangePackageExample
displayName: Rename package name example
recipeList:
  - org.openrewrite.java.ChangePackage:
      oldPackageName: com.yourorg.foo
      newPackageName: com.yourorg.bar

on any project with a module-info.java that exports com.yourorg.foo.

What is the smallest, simplest way to reproduce the problem?

module example {
  exports com.yourorg.foo;
}

What did you expect to see?

module example {
  exports com.yourorg.bar;
}

What did you see instead?

module-info.javas are ignored.

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

timtebeek commented Jun 14, 2024

Hi @commonquail ; thanks for trying out the very latest version! We indeed have some problems with module-info files that we should really hammer out:

Not quite sure what's necessary for a fix there, but we can probably track that in the above issues. It might just be that the module keyword isn't yet supported.

@timtebeek timtebeek moved this to Backlog in OpenRewrite Jun 14, 2024
@timtebeek
Copy link
Contributor

I've updated the first issue that reported problems with module-info.java in #1895 (comment) ; let's track further progress towards support there!

@github-project-automation github-project-automation bot moved this from Backlog to Done in OpenRewrite Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working parser-java
Projects
Archived in project
Development

No branches or pull requests

2 participants