Hi, I get the following error when running tests, although it works correctly on standard runtime: `...
k
Hi, I get the following error when running tests, although it works correctly on standard runtime:
Copy code
java.lang.NoClassDefFoundError: arrow/typeclasses/MonadContinuation
	at arrow.typeclasses.MonadFx$DefaultImpls.monad(Monad.kt:107)
	at arrow.core.extensions.OptionFxMonad.monad(option.kt:223)
	at arrow.core.extensions.OptionFxMonad.monad(option.kt:220)
	at arrow.core.extensions.OptionKt.fx(option.kt:324)
The incriminated code block:
Copy code
private fun Option<Duration>.moreThan5Minutes(compared: Option<Duration>) = (isEmpty() != compared.isEmpty()) || Option.fx {
        val first = bind()
        val second = compared.bind()
        abs(abs(first.toMinutes()) - abs(second.toMinutes())) >= FIVE_MINUTES
    }.getOrElse { false }
In my gradle.kts:
Copy code
implementation(io.arrow-kt:arrow-fx:0.10.4)
implementation(io.arrow-kt:arrow-syntax:0.10.4)
 Oh, and the test work when run through Android Studio 🤔 Any idea what might be causing this?
j
Do you use kotlintest? If so you need to exclude arrow from the kotlintest dependencies
k
Aaah, I do, and I already had these excludes in other modules… Silly me… Thanks!