[Kotlin] Addressing issue #631 #635
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
#631
The Kotlin client fails to compile under Kotlin 2.2.20 because io.github.reidsync:kotlin-json-patch 1.0.0 was built with older Kotlin metadata and does not publish the compatibility metadata variant that the 2.x compiler expects. When Gradle resolves the metadata classpath the symbols disappear, so users hit unresolved reference errors down in DefaultApplyEvents and StateManager.
To unblock consumers, we've vendored the Apache-licensed sources under com.agui.client.jsonpatch, removed the external dependency, and retargeted the call sites. The vendored copy lets us apply Kotlin 2 clean-ups (e.g. lowercase() and identity equality fixes) and guarantees the SDK keeps working while the upstream library is still on the 1.9 toolchain. An issue has been raised with the upstream component (ReidSync/kotlin-json-patch#9).
If reidsync republishes the library with Kotlin 2.x (or at least adds the new metadata variant), we can drop the vendored folder and re-enable the dependency in libs.versions.toml. Until then this keeps Gradle, Android, and iOS builds/tests green.