https://kotlinlang.org logo
#kotest
Title
# kotest
v

vio

04/19/2021, 3:17 PM
hi all, I've recentlly updated to arrow 0.13.1 and facing some issue with the
shouldBeRight {  ... }
function: the error I get:
Copy code
'java.lang.Object arrow.core.Either$Right.getB()'
java.lang.NoSuchMethodError: 'java.lang.Object arrow.core.Either$Right.getB()'
I have version
4.4.3
for kotest libraries, and updated the intellij kotest plugin (version:
1.1.31-IC-2021.1
) the
shouldBeRight()
function works as expected, only the
shouldBeRight { value -> ...}
fails. Any help is apreciated, thank you!
s

sam

04/19/2021, 3:19 PM
The arrow assertions from the main kotest repo are based on 0.11.x
try using the stand alone assertions package
same stuff, but those are based on 0.13.x
v

vio

04/19/2021, 3:34 PM
did use that this is how the import looks like:
import io.kotest.assertions.arrow.either.shouldBeRight
s

sam

04/19/2021, 3:35 PM
definitely seems like a version mismatch at runtime
If you do a gradle build scan you will be able to see if arrow 0.11 or 0.12 is sneaking in somewhere
v

vio

04/19/2021, 4:03 PM
this gradle scan is awesome thanks 🙏
s

sam

04/19/2021, 4:03 PM
yeah its good 🙂
v

vio

04/19/2021, 4:06 PM
hopefully I'm looking in the right place (dependencies -> runtimeClasspath and testCompileClasspath) dependencies look ok
s

sam

04/19/2021, 5:02 PM
There's gotta be something lurking I would say
v

vio

04/19/2021, 6:38 PM
yep
m

mitch

04/19/2021, 9:06 PM
@albertosh @vio the name of the values in arrow internal changed from .b to .value @sam we might need to use fold instead of pattern matching to future proof kotest and avoid breaking changes and make it compatible with arrow 0.10 - > 0.13.x https://github.com/arrow-kt/arrow/blob/main/arrow-libs/core/arrow-core/src/main/kotlin/arrow/core/Either.kt
🙏 1
s

sam

04/19/2021, 9:08 PM
the arrow module has been updated to 0.13.x so should work for .value, but yes in general I agree, fold will be more future proof
👍 1
5 Views