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

fix: Create test module to test SPI #413

Merged
merged 4 commits into from
Aug 26, 2024
Merged

fix: Create test module to test SPI #413

merged 4 commits into from
Aug 26, 2024

Conversation

kewne
Copy link
Contributor

@kewne kewne commented Apr 13, 2024

Adds a "test" module for testing the SPI.

The reason for this is that, due to the changes in how ServiceLoader works, META-INF/services files in test source trees are put in unnamed modules and thus cannot be accessed by the ServiceLoader in the org.javamoney.moneta module.

This should fix the issues from #370.


This change is Reviewable

@keilw
Copy link
Member

keilw commented Apr 19, 2024

Thanks, @kewne, there are many files changed by this PR. We appreciate your contribution, would you consider joining the JCP as an associate member if you plan to contribute on a similar scale more often?
As far as I can see, you are not a JCP member yet, joining is free on every level.

@kewne
Copy link
Contributor Author

kewne commented Apr 20, 2024

@keilw Most of the changes are copying files into the new module. In many cases we can probably remove the originals.
Let me know if you think I should make any changes here or create a follow-up PR.

I'm definitely interested in contributing to this and other projects as I can, I'll look into it. Thanks!

@keilw
Copy link
Member

keilw commented Apr 20, 2024

@kewne That's fine, if you can, please mark the original files @deprecated either via annotation or JavaDoc.

@keilw keilw added the test label Apr 20, 2024
@keilw keilw added this to the 1.4.5 milestone Apr 20, 2024
Copy link
Member

@keilw keilw left a comment

Choose a reason for hiding this comment

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

Since the problem happens particularly with JPMS (Jigsaw) modularity, would it be possible to also declare a module-info for the test module?

@kewne
Copy link
Contributor Author

kewne commented Apr 20, 2024

@keilw Done, I've additionally moved TestRoundingProvider into src/main/java, so it's closer to how it's really used.

Copy link
Member

@keilw keilw left a comment

Choose a reason for hiding this comment

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

Thanks, could we call the module just module org.javamoney.moneta.test ?

@kewne
Copy link
Contributor Author

kewne commented May 13, 2024

@keilw I've renamed the module as requested.

@keilw keilw merged commit a61917b into JavaMoney:master Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants