-
Couldn't load subscription status.
- Fork 67
Support for explicit public API markers #116
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
Conversation
If the added properties are used, all unmatched declarations will be excluded from the API check. If properties for both ignored and explicit markers are set, filtering of ignored declarations will happen after filtering of declarations not explicitly marked as public.
| } | ||
|
|
||
| @ExternalApi | ||
| public fun List<ClassBinarySignature>.retainExplicitlyIncludedIfDeclared( |
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.
Could you please elaborate on whether you do plan to use retainExplicitlyIncludedIfDeclared exclusively or also plugin DSL to use the API?
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.
Nicely done!
[](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.jetbrains.kotlinx.binary-compatibility-validator](https://togithub.com/Kotlin/binary-compatibility-validator) | `0.12.1` -> `0.13.2` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | | [org.jetbrains.kotlinx:binary-compatibility-validator](https://togithub.com/Kotlin/binary-compatibility-validator) | `0.12.1` -> `0.13.2` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### ⚠ Dependency Lookup Warnings ⚠ Warnings were logged while processing this repo. Please check the Dependency Dashboard for more information. --- ### Release Notes <details> <summary>Kotlin/binary-compatibility-validator (org.jetbrains.kotlinx.binary-compatibility-validator)</summary> ### [`v0.13.2`](https://togithub.com/Kotlin/binary-compatibility-validator/releases/tag/0.13.2) [Compare Source](https://togithub.com/Kotlin/binary-compatibility-validator/compare/0.13.1...0.13.2) - `kotlinx-metadata` is updated to 0.6.2 with the support of LV 2.0 ### [`v0.13.1`](https://togithub.com/Kotlin/binary-compatibility-validator/releases/tag/0.13.1) [Compare Source](https://togithub.com/Kotlin/binary-compatibility-validator/compare/0.13.0...0.13.1) - Added support for explicit public API markers ([https://github.com/Kotlin/binary-compatibility-validator/pull/116](https://togithub.com/Kotlin/binary-compatibility-validator/pull/116)) ### [`v0.13.0`](https://togithub.com/Kotlin/binary-compatibility-validator/releases/tag/0.13.0) [Compare Source](https://togithub.com/Kotlin/binary-compatibility-validator/compare/0.12.1...0.13.0) - Kotlin is updated to 1.8.10 - kotlinx-metadata is updated to 0.6.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/elide-dev/elide). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi4xMS4wIiwidXBkYXRlZEluVmVyIjoiMzYuMTEuMCIsInRhcmdldEJyYW5jaCI6InYzIn0=-->
* Add support for defining public declarations explicitly If the added properties are used, all unmatched declarations will be excluded from the API check. If properties for both ignored and explicit markers are set, filtering of ignored declarations will happen after filtering of declarations not explicitly marked as public. * Support validation of non-main source sets for kotlin-jvm projects Pull request Kotlin/binary-compatibility-validator#116
* Add support for defining public declarations explicitly If the added properties are used, all unmatched declarations will be excluded from the API check. If properties for both ignored and explicit markers are set, filtering of ignored declarations will happen after filtering of declarations not explicitly marked as public. * Support validation of non-main source sets for kotlin-jvm projects Pull request Kotlin/binary-compatibility-validator#116
* Add support for defining public declarations explicitly If the added properties are used, all unmatched declarations will be excluded from the API check. If properties for both ignored and explicit markers are set, filtering of ignored declarations will happen after filtering of declarations not explicitly marked as public. * Support validation of non-main source sets for kotlin-jvm projects Pull request Kotlin/binary-compatibility-validator#116
* Add support for defining public declarations explicitly If the added properties are used, all unmatched declarations will be excluded from the API check. If properties for both ignored and explicit markers are set, filtering of ignored declarations will happen after filtering of declarations not explicitly marked as public. * Support validation of non-main source sets for kotlin-jvm projects Pull request Kotlin/binary-compatibility-validator#116 Moved from Kotlin/binary-compatibility-validator@5d08f51
* Add support for defining public declarations explicitly If the added properties are used, all unmatched declarations will be excluded from the API check. If properties for both ignored and explicit markers are set, filtering of ignored declarations will happen after filtering of declarations not explicitly marked as public. * Support validation of non-main source sets for kotlin-jvm projects Pull request Kotlin/binary-compatibility-validator#116 Moved from Kotlin/binary-compatibility-validator@5d08f51
The pull request introduces support for two new features:
ignoredProjects,ignoredPackagesandnonPublicMarkersallow excluding some parts of API from compatibility validation and checking the rest. NewpublicMarkers,publicPackagesandpublicClassesdo the opposite: if any of them is used, only explicitly marked declarations are considered for validation, all the rest are excluded.mainsource set can be validated.Motivation
In
kotlin.gitwe would like to maintain binary compatibility only for a few parts of the:kotlin-gradle-pluginproject related to the External Kotlin Target API, that will be used by third parties when implemented. The declarations are either annotated, or belong to a specific package. Use of the existing API of validator to exclude everything else is not very convenient and would complicate maintenance of the project in the future. Because, for instance, adding new packages would require build script changes, as they have to be excluded from validation. Parts of the relevant code belong to a custom Gradle source set, so without the second introduced feature validation is not possible.Implementation notes
public*properties are used in a build script, which shouldn't affect any users that don't touch the propertieskotlin-jvmGradle plugin to minimize the changes