-
Notifications
You must be signed in to change notification settings - Fork 61
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
Move junit libs to managed block. #936
Conversation
@melix @graemerocher Something is wrong with test resources for R2DBC_MYSQL. All builds failed with the same error: |
This should fix the problem with the mysql:latest image not being compatible, as seen in several places like micronaut-projects/micronaut-gradle-plugin#927 or micronaut-projects/micronaut-test#936 or https://github.com/micronaut-projects/micronaut-test-resources/pull/503/files
* Upgrade testcontainers dependency This should fix the problem with the mysql:latest image not being compatible, as seen in several places like micronaut-projects/micronaut-gradle-plugin#927 or micronaut-projects/micronaut-test#936 or https://github.com/micronaut-projects/micronaut-test-resources/pull/503/files * Revert testcontainers redis dependency As it is a breaking change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't we expose the JUnit5 BOM?
I think in this case it is necessary for internal use in the miсronaut modules, because everyone is tired of constantly describing the junit5 library versions in the catalog, I would like them to connect from the micronaut-test catalog and be accessible via the |
not sure who everyone refers to here, if the JUnit 5 BOM is already imported then it doesn't impact users. For us we have a way to import catalogs and use JUnit, see https://github.com/micronaut-projects/micronaut-reactor/blob/e671a8653a8f8a0fc316a2ede6b541ea088acd0b/settings.gradle#L29 for an example |
Well, the problem is that these libraries are not in the catalog now and in each project you need to describe this library in libs.versions.toml. That is, now you can connect the junit-jupiter-engine and junit-jupiter-params libraries only in this way (example from micronaut-openapi) This task was not invented by me, but by @melix , I suspect that only managed libraries get into the version catalog. But this is not 100% But judging by the description of the task, it is so |
It seems that there are a couple things. The first is that we do import the junit platform BOM already. This means that in any project, you can add a dependency on JUnit without having to declare the version, as long as the However, since JUnit is not a Micronaut platform, then you won't have accessors like Strictly speaking, "everyone is tired of constantly describing the junit5 library versions in the catalog" is not a good argument:
In this case it seems reasonable to add such entries here, I think. |
True, but as you correctly noted, we already provide the user with access to the bom file. so I don't see a problem in making it easier to use junit using the version catalog. |
It's the other way around ;) The BOM files are primarily meant for users, not us : they will impact the dependency resolution of user app. That's why we must be careful what we add there. |
Apparently, there is a complex logic hidden here that I don't really understand. For me, as a user, the only difference will be that I will be able to remove these 2 lines from the file:
which will give me pleasure :-) |
@graemerocher @melix Could you merge it? |
I don't like this change and I don't think we should follow this pattern in other modules. We are already exposing the BOM. I see no issue of having in the modules.
|
Fixed #831