hi all, I've recentlly updated to arrow 0.13.1 and...
# kotest
v
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
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
did use that this is how the import looks like:
import io.kotest.assertions.arrow.either.shouldBeRight
s
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
this gradle scan is awesome thanks 🙏
s
yeah its good 🙂
v
hopefully I'm looking in the right place (dependencies -> runtimeClasspath and testCompileClasspath) dependencies look ok
s
There's gotta be something lurking I would say
v
yep
m
@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
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