-
Notifications
You must be signed in to change notification settings - Fork 437
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
NoSuchMethodError when using @ExperimentalTime methods in arrow-fx-coroutines with Kotlin 1.5 #2395
Comments
Hi @kageru , thanks!
Yes, it was done in Arrow as well from 0.12.x and 0.13.x (included): #2320 For instance, to check it:
So could |
I updated the link of the related change: #2320 |
My test project is built with Kotlin 1.5, so it depends on the 1.5 stdlib. And speaking of which, are there plans for this or do you want to stay on 1.4 for a while? |
Oh, ok, thanks @kageru. All the things are moving to Kotlin 1.5 now. However I'd recommend you the first option right now (not using |
Okay, I’ll try to do that (not sure yet how often we use those functions in our projects; I only stumbled upon one so far, so it’s probably not too much effort to change). |
Yes, please, thank you so much @kageru ! |
Hi @kageru, We are now in 1.5.10 in |
Kotlin 1.5 changed the implementation of
kotlin.time.Duration
frominline class(val value: Double)
tovalue class(val value: Long)
. The current release of Arrow depends on the Kotlin 1.4 standard library, so methods likearrow.fx.coroutines.Schedule.spaced(Duration)
generate bytecode forspaced-LRDsOJo(double)
(the random characters are expected name mangling to avoid conflicts when using inline classes as parameters).When compiling a project with Kotlin 1.5, this results in a
NoSuchMethodError
at runtime.Small example:
results in
Kotest recently switched to including the stdlib as
compileOnly
in gradle to prevent issues like this one. Given that inline classes are erased at compile time, I don’t know if that would have helped here, but it might be worth looking into.The text was updated successfully, but these errors were encountered: