-
Notifications
You must be signed in to change notification settings - Fork 62
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
Add binary API compatibility checks to v1 branch #1427
Conversation
@@ -31,6 +32,7 @@ object Versions { | |||
} | |||
|
|||
object Plugins { | |||
const val binaryCompatibilityValidator = "org.jetbrains.kotlinx:binary-compatibility-validator:${Versions.binaryCompatibilityValidator}" |
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.
Apply binary compatibility checks for any published package.
apiValidation { | ||
/** | ||
* Classes (fully qualified) that are excluded from public API dumps even if they | ||
* contain public API. | ||
*/ | ||
ignoredClasses.addAll( | ||
listOf( | ||
"org.partiql.lang.compiler.PartiQLCompilerPipeline" // deprecated | ||
) | ||
) | ||
} |
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.
Example configuration for a specific package to ignore a certain, deprecated class. The Kotlin binary API compatibility checker provides some more configurability here -- https://github.com/Kotlin/binary-compatibility-validator/tree/master?tab=readme-ov-file#optional-parameters.
Conformance comparison report-Cross Engine
Number failing in both: 263 Number passing in legacy engine but fail in eval engine: 777 Number failing in legacy engine but pass in eval engine: 172 Conformance comparison report-Cross Commit-LEGACY
Number failing in both: 435 Number passing in Base (04e33a8) but now fail: 0 Number failing in Base (04e33a8) but now pass: 1 Click here to see
Conformance comparison report-Cross Commit-EVAL
Number failing in both: 1040 Number passing in Base (04e33a8) but now fail: 0 Number failing in Base (04e33a8) but now pass: 0 |
Relevant Issues
Description
PR shows the current set of public APIs in all of our published libraries. I used https://github.com/Kotlin/binary-compatibility-validator gradle plugin which maintains a list of public binary APIs (as a
.api
file committed to our project). By default, the gradle task will run theapiCheck
task. If there's a change to the public API (adding, modifying, deleting anything public), theapiCheck
task will fail. To fix the failure, we can runapiDump
to update the.api
file(s) and commit the changes.Other Information
Updated Unreleased Section in CHANGELOG: [NO]
Any backward-incompatible changes? [NO]
Any new external dependencies? [YES]
Do your changes comply with the Contributing Guidelines
and Code Style Guidelines? [YES]
License Information
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.