Skip to content

Conversation

@kpavlov
Copy link
Contributor

@kpavlov kpavlov commented Sep 8, 2025

Downgrade Kotlin to 2.1.21

Motivation and Context

Compiled iOS client is not compatible with frameworks, which are using older version of Kotlin.

Kotlin version should be downgraded 2.2.0->2.1.21 to make possible use native artifacts in other projects, e.g. Koog

Changes

  • Downgrade Kotlin 2.2.0->2.1.21 to make broader adoption possible. Update Kotlin compiler configuration
  • Breaking change: Add kotlinx-datetime dependency. Switch from kotlin.time.Instant to kotlinx.datetime.Instant.
  • Downgrade atomicfu 0.29.0->0.28.0
  • Downgrade kotlinx-serialization 1.9.0->1.8.1

Breaking Changes

  • Switch to kotlinx-datetime is causing signature changes: kotlin.time.Instant to kotlinx.datetime.Instant.

How Has This Been Tested?

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

- Downgrade Kotlin 2.2.0->2.1.21 to make broader adoption possible. Update Kotlin compiler configuration
- Add [kotlinx-datetime](https://github.com/Kotlin/kotlinx-datetime) dependency. Switch from `kotlin.time.Instant` to `kotlinx.datetime.Instant`.
- Downgrade atomicfu 0.29.0->0.28.0
- Downgrade kotlinx-serialization 1.9.0->1.8.1
@kpavlov kpavlov marked this pull request as ready for review September 8, 2025 07:58
@devcrocod
Copy link
Contributor

devcrocod commented Sep 8, 2025

Breaking change: Add kotlinx-datetime dependency. Switch from kotlin.time.Instant to kotlinx.datetime.Instant.
Downgrade atomicfu 0.29.0->0.28.0
Downgrade kotlinx-serialization 1.9.0->1.8.1
 

 Why did you make these changes? 

@kpavlov
Copy link
Contributor Author

kpavlov commented Sep 8, 2025

Why did you make these changes?

Because compiled Kotlin native library can't be used in the project, which is using lower Kotlin version.

@devcrocod
Copy link
Contributor

Because compiled Kotlin native library can't be used in the project, which is using lower Kotlin version.

Then we can update koog to 2.2.10 kotlin

I don’t think downgrading the Kotlin version and all the kotlinx libraries in the sdk is a good idea. On top of that, switching Instant to the library one would lead to incompatibility, and it will eventually be deprecated in favor of the stdlib

In my view, ios is not the main target to justify doing that

@kpavlov kpavlov marked this pull request as draft September 8, 2025 12:59
@kpavlov
Copy link
Contributor Author

kpavlov commented Sep 8, 2025

Let's try upgraing Koog, indeed

@kpavlov kpavlov added help wanted Extra attention is needed question Further information is requested labels Sep 10, 2025
@kpavlov
Copy link
Contributor Author

kpavlov commented Sep 12, 2025

Closing it for now

@kpavlov kpavlov closed this Sep 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

help wanted Extra attention is needed question Further information is requested

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants