Hi folks, I’m trying to reactivate the ConcurrentL...
# arrow-contributors
a
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
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
I just used the fx-test instances and we’ve got more laws failing 😕
s
Whut!?
a
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
Wow weird. That should not fail
Why is it failing? Hard to read with
IO$Pure
a
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
Shouldn’t impact the
apEval
test
j
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
Wasn’t that the whole point of going through
Eval
?
j
It is for all applicatives that are not transformers
Only the monad transformer types and effect types have this problem
👍 1
s
Right, okay so you’re saying that
apEval
cannot be stack-safe for any
F
for a transformers instance?
Right
j
Yeah because you usually need to flatMap through F first
s
Yep
j
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
I can review that later today
j
Thanks 👍
a