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

Peter

11/15/2021, 3:23 AM
Copy code
'java.lang.Throwable io.kotest.assertions.eq.EqKt.eq$default(java.lang.Object, java.lang.Object, boolean, int, java.lang.Object)'
java.lang.NoSuchMethodError: 'java.lang.Throwable io.kotest.assertions.eq.EqKt.eq$default(java.lang.Object, java.lang.Object, boolean, int, java.lang.Object)'
this happens when i do
x().shouldBeSome("y")
kotest 4.6.3 io.kotest.extensionskotest assertions arrow1.1.1
s

sam

11/15/2021, 3:31 AM
What versions of arrow and kotest-arrow extensions ?
p

Peter

11/15/2021, 3:32 AM
arrow: 1.0.1
maybe i’m missing kotest-arrow-extensions 🤔
when arrow released 1.0 a bunch of stuff changed
p

Peter

11/15/2021, 3:33 AM
so i need something in addition to
io.kotest.extensions:kotest-assertions-arrow:1.1.1
?
s

sam

11/15/2021, 3:33 AM
hmmm that should be good
p

Peter

11/15/2021, 3:33 AM
s

sam

11/15/2021, 3:34 AM
ok so 1.1.1 is using kotest 5.0.0.M3
p

Peter

11/15/2021, 3:34 AM
ahhh
how about 1.1.0?
s

sam

11/15/2021, 3:35 AM
looks like the same, probably because arrow 1.0 is now MPP
and for that we need Kotest 5.0
p

Peter

11/15/2021, 3:35 AM
gotcha
any idea if kotest 5.0 will be out this year?
s

sam

11/15/2021, 3:36 AM
kotest 5 is just waiting on kotlin 1.6 final
so maybe this week, depends when JB release 1.6
p

Peter

11/15/2021, 3:36 AM
excellent .. aren’t we all 😄
s

sam

11/15/2021, 3:37 AM
if you're happy with 1.6 rc2
then kotest 5.0.0.M4 is stable
I don't think anything else will change between M4 and final
p

Peter

11/15/2021, 3:39 AM
that’s good to know, thank you!
👍🏻 1
random q: do you use Arrow in your day to day? i’m busy building a library i want to open source and using Arrow quite a bit .. wonder how much that will hinder adoption
s

sam

11/15/2021, 3:42 AM
I don't use it personally
For Kotest, I don't use it because I view Kotest as a "base level" dependency for projects. It should be dependency free as much as possible since a lot of community projects rely on it.
p

Peter

11/15/2021, 3:43 AM
ah interesting - if i remember correctly you have a scala background too, just learned to live without the options/eithers & cat theory?
s

sam

11/15/2021, 3:43 AM
No I wrote my own
p

Peter

11/15/2021, 3:43 AM
oh right .. i meant in your professional work (not kotest)
ahh
s

sam

11/15/2021, 3:43 AM
ok for professional....
I used to use it but then moved away as each release broke things. Now I understand that as a new library that's bound to happen, but when you're trying to encourage FP adoption amongst colleagues who are perhaps more "java enterprise spring" devs, changing things each release isn't helpful.
Now that it's gone 1.0 and the API is locked in, would I use it? absolutely,
p

Peter

11/15/2021, 3:46 AM
hahah… also surrounded by java/springboot colleagues … it’s a slow grind to spread the good word 😉
s

sam

11/15/2021, 3:47 AM
It can be frustrating, but I've had very positive feedback around my preferred stack - ktor for http, my own library for basic FP types (tabby), my own configuration library for immutable config (hoplite) and staying away from DI.
And obviously Kotest
when I can show people a suite of tests that test a real database against test containers, without a single mock, all in kotest, people generally come away convinced
I have a running joke at work "current mock count: 0" in my slack room titles
❤️ 1
p

Peter

11/15/2021, 3:48 AM
very nice … i put together a very simple example ktor project for my colleagues, immutable config using config4k, also no DI (using pure functions), also no mocking
s

sam

11/15/2021, 3:48 AM
you don't need mocking
I saw a post on twitter the other day, about writing new features without ever running the service. That's what I do, you can be very confident in your code if you unit test it properly, then you QA test it in the "Real world" in your deployed dev env
💯 1
I recently replaced a huge profiles service (I work for grindr), a complete replacement for all profiles endpoints. It was in dropwizard, now it's in ktor. And after replacing 10,000 lines of code, we had like 3 minor bugs after we went into prod. I attribute that to the high quality of tests, which FP (and Kotest!) made possible.
p

Peter

11/15/2021, 3:51 AM
if i pull it over into a public repo, would you be willing to give any feedback? it’s very minimal … might be interesting 🤷‍♂️
whoa.. that’s amazing!
👍🏻 1
s

sam

11/15/2021, 3:51 AM
always
p

Peter

11/15/2021, 3:52 AM
awesome thank you .. should have it tomorrow, trying to get v0.1 of this jwt library out the door
3 Views