-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
open-api: Fix compile warnings for testFixtures #11071
Conversation
@@ -177,6 +178,7 @@ slf4j-simple = { module = "org.slf4j:slf4j-simple", version.ref = "slf4j" } | |||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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-cache
results in compile warnings for open-api module.The reason is that new dependencies that are added in #10908 requires
apigurdian
duringtestFixtureCompilation
.