Skip to content

Conversation

@fzhinkin
Copy link
Collaborator

Replaced kotlinx-metadata-jvm with kotlin-metadata-jvm, and updated the code to use a new API.

@fzhinkin fzhinkin requested a review from sandwwraith July 12, 2024 14:55
@fzhinkin fzhinkin force-pushed the update-metadata-lib branch from 1a92d10 to 3013d41 Compare July 12, 2024 14:56

val property = companionClassCandidate?.kmProperty(name)

if (property != null && JvmFlag.Property.IS_MOVED_FROM_INTERFACE_COMPANION(property.flags)) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was a bug, and JvmFlag.Property.IS_MOVED_FROM_INTERFACE_COMPANION worked here purely by coincidence.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks to the new stable API, it became obvious! ;)

@fzhinkin fzhinkin linked an issue Jul 12, 2024 that may be closed by this pull request
@fzhinkin fzhinkin added the jvm label Jul 12, 2024
W.r.t. newer metadata versions
@fzhinkin fzhinkin requested a review from shanshin July 15, 2024 09:19
@fzhinkin
Copy link
Collaborator Author

kotlin-metadata-jvm seems to be API-compatible with Kotlin 1.6, but the API version is not set explicitly. Here's an issue on that: https://youtrack.jetbrains.com/issue/KT-69903

@fzhinkin fzhinkin merged commit 6428c88 into develop Jul 15, 2024
@fzhinkin fzhinkin deleted the update-metadata-lib branch July 15, 2024 11:23
shanshin pushed a commit to JetBrains/kotlin that referenced this pull request Oct 28, 2024
* Use stable kotlin-metadata-jvm version
* Fixed check for properties declared in a companion object
* Use readLenient to be more lenient w.r.t. newer metadata versions
Pull request Kotlin/binary-compatibility-validator#255
shanshin pushed a commit to JetBrains/kotlin that referenced this pull request Dec 3, 2024
* Use stable kotlin-metadata-jvm version
* Fixed check for properties declared in a companion object
* Use readLenient to be more lenient w.r.t. newer metadata versions
Pull request Kotlin/binary-compatibility-validator#255
shanshin pushed a commit to JetBrains/kotlin that referenced this pull request Dec 13, 2024
* Use stable kotlin-metadata-jvm version
* Fixed check for properties declared in a companion object
* Use readLenient to be more lenient w.r.t. newer metadata versions
Pull request Kotlin/binary-compatibility-validator#255
shanshin pushed a commit to JetBrains/kotlin that referenced this pull request Dec 23, 2024
* Use stable kotlin-metadata-jvm version
* Fixed check for properties declared in a companion object
* Use readLenient to be more lenient w.r.t. newer metadata versions
Pull request Kotlin/binary-compatibility-validator#255

Moved from Kotlin/binary-compatibility-validator@6428c88
KotlinBuild pushed a commit to JetBrains/kotlin that referenced this pull request Jan 3, 2025
* Use stable kotlin-metadata-jvm version
* Fixed check for properties declared in a companion object
* Use readLenient to be more lenient w.r.t. newer metadata versions
Pull request Kotlin/binary-compatibility-validator#255

Moved from Kotlin/binary-compatibility-validator@6428c88
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate to newer kotlin-metadata-jvm

4 participants