is it known that the native mock engine is broken ...
# ktor
k
is it known that the native mock engine is broken in 1.4?
r
What's broken? It's been working fine for me
k
it does not function at all on iOS
i am assuming it's because there is no 1.4 version published for the native engine
r
There's no dependency named "-native" anymore (same as every other kotlinx lib with the 1.4 updates) but the native platforms still exist. Just include
ktor-client-mock
from your
commonTest
dependencies and let metadata take care of it
k
that's what I have done
but interestingly there's still a
jvm
variant
but I guess that makes sense because that's a "concrete" artifact, but native isn't. it would be iosArm64, iosX86, etc...
explains why I don't get build or runtime errors. but the handler is still not receiving any requests (and it worked fine before)
r
Yeah. Single-platform variants still exist. But
native
was actually doing what you want
common
to do so they updated the naming. You could include individual native targets it you wanted to as well like
ktor-client-mock-iosx64
k
erp, just found the problem
this is coming from Ktor:
kotlin.native.concurrent.InvalidMutabilityException: mutation attempt of frozen kotlinx.coroutines.ChildHandleNode@ece212c8
r
Make sure you're using coroutines
1.3.9-native-mt
k
hmmm
I was under the impression that wasn't ready for production
r
Ktor is using it internally now
k
well, let's give it a go I suppose
well, now it fails differently
kotlin.native.concurrent.FreezingException: freezing of InvokeOnCompletion[InvokeOnCompletion@42d53cf8] has failed, first blocker is BlockingCoroutine{Active}@12c10b68
i get the impression i will be switching to my own HTTP implementation instead of Ktor