open-api: Fix compile warnings for testFixtures#11071
Conversation
| snowflake-jdbc = { module = "net.snowflake:snowflake-jdbc", version.ref = "snowflake-jdbc" } | ||
|
|
||
| # test libraries | ||
| apiguardian = { module = "org.apiguardian:apiguardian-api", version.ref = "apiguardian" } |
There was a problem hiding this comment.
Apache licensed
https://github.com/apiguardian-team/apiguardian
|
@ajantha-bhat Strange as it may seem, we can use exclusions and not add a new library: testImplementation(libs.junit.suite.api) {
exclude group: 'org.junit.jupiter'
}
testImplementation(libs.junit.suite.engine) {
exclude group: 'org.junit.jupiter'
}I think I'd prefer this over adding new libraries |
|
@danielcweeks: I tried excluding as you suggested and it didn't work. I also tried excluding just the The compile warnings is from I didn't find a way to fix these warnings without adding this compile time dependency. Feel free to try it out and let me know if there are other ways to handle this. |
|
@ajantha-bhat Yeah, you're right. I must have been running with a cache and it was hiding the errors. The dependency is pulled in via the import org.junit.jupiter.api.extension.AfterAllCallback;
import org.junit.jupiter.api.extension.BeforeAllCallback;
import org.junit.jupiter.api.extension.ExtensionContext;which in turn have the annotations: @API(
status = Status.STABLE,
since = "5.0"
)I think they had previously fixed this issue in JUnit, but it looks like it has crept back into the latest releases. |
./gradlew clean build -x test -x integrationTest --no-build-cacheresults in compile warnings for open-api module.The reason is that new dependencies that are added in #10908 requires
apigurdianduringtestFixtureCompilation.