https://kotlinlang.org logo
#arrow-contributors
Title
# arrow-contributors
a

aballano

03/18/2020, 1:20 PM
Hi folks, I’m trying to reactivate the ConcurrentLaws tests in incubator but I got no luck so far, it seems there’s a flaky scenario specifically within the
cancellableReceivesCancelSignal
test, any help here would be greatly appreciated. Also, I noticed that incubator provides its own instances of genK and eqK for IO -> https://github.com/arrow-kt/arrow-incubator/blob/master/arrow-mtl-data/src/test/kotlin/arrow/mtl/test/generators/GenK.kt#L20 so I’d also like to ask if there’s a specific reason not to use the provided in fx-test // cc @Jannis
s

simon.vergauwen

03/18/2020, 1:22 PM
Needs an update PR after the
IO
`Gen`/`Eq` were merged to
arrow-fx-test
That’s just outdated code from the
arrow-test
re-org
☝️ 1
a

aballano

03/18/2020, 1:31 PM
I just used the fx-test instances and we’ve got more laws failing 😕
s

simon.vergauwen

03/18/2020, 1:31 PM
Whut!?
a

aballano

03/18/2020, 1:31 PM
arrow.mtl.test.OptionTTest.Applicative Laws: apEval consistent with ap
Copy code
Property failed for
Arg 0: OptionT(value=<http://arrow.fx.IO|arrow.fx.IO>$Pure@7042e567)
Arg 1: OptionT(value=<http://arrow.fx.IO|arrow.fx.IO>$RaiseError@6fd57ab6)
after 31 attempts
Caused by: expected: true but was: false
s

simon.vergauwen

03/18/2020, 1:35 PM
Wow weird. That should not fail
Why is it failing? Hard to read with
IO$Pure
a

aballano

03/18/2020, 1:37 PM
it seems the gen in mtl was only giving pure instances of IO, not errors
so the tests are failing due to that not taken into account it seems
s

simon.vergauwen

03/18/2020, 1:43 PM
Shouldn’t impact the
apEval
test
j

Jannis

03/18/2020, 1:49 PM
No it may, I think that I implemented apEval in the wrong way
Will check and make a pr if so
Well yes it is wrong, will make a pr in the next hour or so. The annoying part with this is stacksafety because we can't thread eval through an arbitrary F so this will fail for stack unsafe F. That's usually not a problem, but still annoying
s

simon.vergauwen

03/18/2020, 1:52 PM
Wasn’t that the whole point of going through
Eval
?
j

Jannis

03/18/2020, 1:55 PM
It is for all applicatives that are not transformers
Only the monad transformer types and effect types have this problem
👍 1
s

simon.vergauwen

03/18/2020, 1:55 PM
Right, okay so you’re saying that
apEval
cannot be stack-safe for any
F
for a transformers instance?
Right
j

Jannis

03/18/2020, 1:56 PM
Yeah because you usually need to flatMap through F first
s

simon.vergauwen

03/18/2020, 1:56 PM
Yep
j

Jannis

03/18/2020, 2:08 PM
Oh right: I already fixed both of the issues here: https://github.com/arrow-kt/arrow-incubator/pull/76/ I removed the io genK parts and fixed the optiont issue there^^
s

simon.vergauwen

03/18/2020, 2:09 PM
I can review that later today
j

Jannis

03/18/2020, 2:11 PM
Thanks 👍
a

aballano

03/20/2020, 4:22 PM
6 Views