Skip to content
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

Update Kotlin to 2.0 #327

Merged
merged 6 commits into from
Jun 6, 2024
Merged

Update Kotlin to 2.0 #327

merged 6 commits into from
Jun 6, 2024

Conversation

fzhinkin
Copy link
Collaborator

No description provided.

@fzhinkin fzhinkin requested a review from sandwwraith May 17, 2024 17:26
@fzhinkin fzhinkin marked this pull request as ready for review May 17, 2024 17:26
Copy link
Contributor

@whyoleg whyoleg left a comment

Choose a reason for hiding this comment

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

Just some minor comments :)

core/nodeFilesystemShared/src/files/FileSystemNodeJs.kt Outdated Show resolved Hide resolved
core/native/src/files/FileSystemNative.kt Outdated Show resolved Hide resolved
core/nodeFilesystemShared/src/files/PathsNodeJs.kt Outdated Show resolved Hide resolved
@lppedd
Copy link
Contributor

lppedd commented May 18, 2024

Does this change retain compatibility with 1.9.x?

@fzhinkin
Copy link
Collaborator Author

fzhinkin commented May 21, 2024

@lppedd, For JVM, there are some forward compatibility guarantees: https://kotlinlang.org/docs/kotlin-evolution.html#evolving-the-binary-format; but for KMP, as per JetBrains/kotlin-web-site#4216, there are no such guarantees.
I've checked if a 1.9.x-based project will work with a 2.0-based kotlinx-io (0.4.0-alpha built from this branch and hosted in https://oss.sonatype.org/content/repositories/orgjetbrainskotlinx-3346) and it seems to work fine for all targets except Wasm.

UPD: for the Wasm, an issue could be fixed to some extent by restricting stdlib version on the consumer side so it remains 1.9.x (implementation(kotlin("stdlib")) { version { strictly("1.9.24") } }).

@lppedd
Copy link
Contributor

lppedd commented May 21, 2024

@fzhinkin so basically even setting

apiVersion = KotlinVersion.KOTLIN_1_9
languageVersion = KotlinVersion.KOTLIN_1_9

wouldn't help? I'm just asking that because libraries suddenly requiring 2.0+ means whoever is using 1.9.x can't update anything. I've seen coroutines doing the same, serialization too. This seems a bit risky imo.

@fzhinkin
Copy link
Collaborator Author

@lppedd

so basically even setting

apiVersion = KotlinVersion.KOTLIN_1_9
languageVersion = KotlinVersion.KOTLIN_1_9

wouldn't help?

Neither of these options affects binary compatibility, so no, unfortunately, that won't help.

I'm just asking that because libraries suddenly requiring 2.0+ means whoever is using 1.9.x can't update anything. I've seen coroutines doing the same, serialization too. This seems a bit risky IMO.

For kotlinx-io, the new release will only switch the Kotlin version, so those who can't update the version in their projects can continue using 0.3.5 for a while.

Note that in terms of compatibility, there's nothing new here, and the same happened previously when libraries updated the Kotlin version from 1.8 to 1.9, for example.

@fzhinkin fzhinkin requested a review from shanshin May 27, 2024 08:08
@fzhinkin fzhinkin merged commit 6c4dbdf into develop Jun 6, 2024
1 check passed
@fzhinkin fzhinkin deleted the kotlin-2.0-branch branch August 27, 2024 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants