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

Cleans up the module names according to JPMS rules. #5802

Merged
merged 2 commits into from
Oct 10, 2023

Conversation

pkriens
Copy link
Member

@pkriens pkriens commented Oct 9, 2023

See #5792

This PR fixes the module name. Expect a PR from @ppkarwasz for the second part


Signed-off-by: Peter Kriens Peter.Kriens@aQute.biz

---
 Signed-off-by: Peter Kriens <Peter.Kriens@aQute.biz>

Signed-off-by: Peter Kriens <Peter.Kriens@aQute.biz>
---
 Signed-off-by: Peter Kriens <Peter.Kriens@aQute.biz>

Signed-off-by: Peter Kriens <Peter.Kriens@aQute.biz>
Copy link

@ppkarwasz ppkarwasz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

.anyMatch(e -> e.requires.equals("geronimo-jcdi_2.0_spec"))
.anyMatch(e -> e.requires.equals("geronimo.jcdi.2.0.spec"))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seemed strange to me that Java uses geronimo.jcdi.2.0.spec as module name, which is invalid since 2 and 0 are not valid identifiers.

However jar -d -f generates the same identifier, so it is not a bug, but a feature:

piotr@bialykiel:~$ jar -d -f ~/.m2/repository/org/apache/geronimo/specs/geronimo-jcdi_2.0_spec/1.1/geronimo-jcdi_2.0_spec-1.1.jar
Unable to derive module descriptor for: /home/piotr/.m2/repository/org/apache/geronimo/specs/geronimo-jcdi_2.0_spec/1.1/geronimo-jcdi_2.0_spec-1.1.jar
geronimo.jcdi.2.0.spec: Invalid module name: '2' is not a Java identifier

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had chat gpt verify the given algorithm and my (quite inventive!) code solution.

Thanks for checking. You will still make a PR for the other part?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I'll submit a PR, although it might take some time, since I am swamped at work.

@pkriens pkriens merged commit eda505e into bndtools:master Oct 10, 2023
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants