and a second semi-related question: ``` get(): A' ...
# arrow
s
and a second semi-related question:
Copy code
get(): A' is deprecated. This function is unsafe and will be removed in future versions of Arrow. Replace or import `arrow.syntax.unsafe.*` if you wish to continue using it in this way
how does one import
arrow.syntax.unsafe.*
? I can’t find that anywhere
k
What version of arrow are you using?
s
0.7.3
k
is this about Option#get?
s
yes. sorry forgot to specify
k
Yes #get is indeed dangerous, since it will throw an Exception if it is a None. I guess you would rather use
fold
or
getOrElse
. Not sure about
unsafe
, but I'd recommend using either fold or getOrElse
s
yeah. I’d like to eliminate the usages of
Option.get()
in this project but it’s being used in a couple unit tests in a way that I can’t easily replace (other than doing something like
orNull()!!
) thanks for the reply!
k
As for your other problem, what version of arrow is kotlintest-assertions-arrow using? Maybe you have 2 arrow verisons on your classpath which might be causing the issue?
Or even different versions of Kotlin
s
ah good point. looks like kotlintest depends on arrow 0.8.2. I think that means all of my other dependencies will automatically use that version too? kotlin-syntax might still be on v0.7.3…so I think you’re right
k
You can run
gradlew -q dependencyInsight --dependency io.arrow-kt
to see what version of arrow is being used
s
👍 looks like that was causing the problem.
Option.get()
was removed in 0.8.0. thanks
👍 1