-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Update to Kotlin 2.0-RC3 #4129
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 to Kotlin 2.0-RC3 #4129
Conversation
Apply all workarounds from k2 branch
If I'm stuck on the 1.9 line, will I be able to consume the new artifacts? |
@@ -0,0 +1,19 @@ | |||
package kotlinx.coroutines.test.internal | |||
|
|||
/* This is a declaration of JS's `Promise<Unit>`. We need to keep it a separate class, because |
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.
Worth linking to https://youtrack.jetbrains.com/issue/KT-60561 ?
I just hope it gets fixed soon tbh, this workaround means everyone is going to have their own promise types, a mess.
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.
Huh? Is everyone really creating their own Promise
types? The TestResult
class has a very specific and technical purpose: to let Kotlin know that it should handle the values returned from @Test fun
on JS in a specific manner. Do many other codebases maintain their own test frameworks instead of using kotlinx-coroutines-test
?
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.
Well it's not really just for testing. I have some typealiases to Promise<T>
in my KMP project and I can work with them in K1. In K2 I have to remove the typealias or have to create an intermediate class, just like JsPromiseInterfaceForTesting
.
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.
typealias Future<T> = Promise<T>
should still work. Is your use case covered by it?
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.
It works because you have the type parameter in Future
, but something like typealias HostValue = Promise<Int>
won't work. This plus KT-61043 makes working with typealiases a lot more cumbersome.
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.
Compilation fails. I think the reason is that the Kotlin version in integration-testing
should also be updated.
Apply all workarounds from k2 branch