suresh
08/08/2025, 12:16 AMsuresh
08/08/2025, 12:16 AM02:59.707 ERROR :shared:linkMacosArm64TestRelease info: <shared_test> @ /Users/sgopal1/code/kmp-amper/shared/test/CommonTest.kt:30:34: Lambda in function 'httpClientTest' uses unlinked class symbol 'kotlinx.coroutines.test/TestScope|null[0]'
02:59.708 ERROR :shared:linkMacosArm64TestRelease info: <shared_test> @ /Users/sgopal1/code/kmp-amper/shared/test/CommonTest.kt:30:34: Expression can not be evaluated: Expression uses unlinked class symbol 'kotlinx.coroutines.test/TestScope|null[0]'
02:59.708 ERROR :shared:linkMacosArm64TestRelease info: <shared_test> @ /Users/sgopal1/code/kmp-amper/shared/test/CommonTest.kt:30:26: Function 'runTest' can not be called: No function found for symbol 'kotlinx.coroutines.test/runTest|runTest(kotlin.coroutines.CoroutineContext;kotlin.time.Duration;kotlin.coroutines.SuspendFunction1<kotlinx.coroutines.test.TestScope,kotlin.Unit>){}[0]'
02:59.708 ERROR :shared:linkMacosArm64TestRelease info: <missing declarations>: No class found for symbol 'kotlinx.coroutines.test/TestScope|null[0]'
02:59.708 ERROR :shared:linkMacosArm64TestRelease info: <missing declarations>: No class found for symbol 'io.ktor.client.engine.mock/MockEngine|null[0]'
02:59.709 ERROR :shared:linkMacosArm64TestRelease info: <missing declarations>: No class found for symbol 'io.ktor.client.engine.mock/MockEngine.Companion|null[0]'
02:59.709 ERROR :shared:linkMacosArm64TestRelease info: <missing declarations>: No class found for symbol 'io.ktor.client.engine.mock/MockRequestHandleScope|null[0]'
02:59.709 ERROR :shared:linkMacosArm64TestRelease info: <missing declarations>: No function found for symbol 'kotlinx.coroutines.test/runTest|runTest(kotlin.coroutines.CoroutineContext;kotlin.time.Duration;kotlin.coroutines.SuspendFunction1<kotlinx.coroutines.test.TestScope,kotlin.Unit>){}[0]'
02:59.710 ERROR :shared:linkMacosArm64TestRelease info: <missing declarations>: No function found for symbol 'io.ktor.client.engine.mock/MockEngine.Companion.invoke|invoke(kotlin.coroutines.SuspendFunction2<io.ktor.client.engine.mock.MockRequestHandleScope,io.ktor.client.request.HttpRequestData,io.ktor.client.request.HttpResponseData>){}[0]'
02:59.710 ERROR :shared:linkMacosArm64TestRelease info: <missing declarations>: No function found for symbol 'io.ktor.client.engine.mock/respondError|respondError@io.ktor.client.engine.mock.MockRequestHandleScope(io.ktor.http.HttpStatusCode;kotlin.String;io.ktor.http.Headers){}[0]'
Build successful
suresh
08/08/2025, 12:17 AMsuresh
08/08/2025, 12:17 AM[ RUN ] CommonTest.platformTest
kotlin.native.internal.IrLinkageError: Expression can not be evaluated: Expression uses unlinked class symbol 'kotlinx.coroutines.test/TestScope|null[0]'
[ OK ] CommonTest.platformTest (0 ms)
[ RUN ] CommonTest.httpClientTest
at 0 shared_test.kexe 0x102282077 kfun:kotlin.Throwable#<init>(kotlin.String?){} + 99 (/opt/buildAgent/work/2d153abd4d2c0600/kotlin/kotlin-native/runtime/src/main/kotlin/kotlin/Throwable.kt:30:51)
at 1 shared_test.kexe 0x10227c7e7 kfun:kotlin.Error#<init>(kotlin.String?){} + 95 (/opt/buildAgent/work/2d153abd4d2c0600/kotlin/kotlin-native/runtime/src/main/kotlin/kotlin/Exceptions.kt:12:51)
[ FAILED ] CommonTest.httpClientTest (0 ms)
at 2 shared_test.kexe 0x1022ae6eb kfun:kotlin.native.internal.IrLinkageError#<init>(kotlin.String?){} + 95 (/opt/buildAgent/work/2d153abd4d2c0600/kotlin/kotlin-native/runtime/src/main/kotlin/kotlin/native/internal/RuntimeUtils.kt:138:51)
[----------] 2 tests from CommonTest (1454 ms total)
suresh
08/08/2025, 12:19 AMFedor Ihnatkevich
08/12/2025, 12:57 PMsuresh
08/12/2025, 7:34 PM2.2.20-Beta2
) and coroutines . Would that be an issue? You can reproduce this by running
$ git clone <https://github.com/sureshg/kmp-amper.git>
$ cd kmp-amper
$ ./amper build -v release
# Tests are failing though, but the binary is working fine
$ ./amper test
Fedor Ihnatkevich
08/14/2025, 5:18 PMFedor Ihnatkevich
08/15/2025, 3:22 PM0.8.0-dev-3098
and later contain the fix for native test linkage dependencies. Why linkage errors don't fail the task is going to be investigated separately.suresh
08/15/2025, 3:24 PM00:20.260 INFO :macos:linkMacosArm64TestRelease No test code was found compiled for fragments [appleTest, commonTest, macosArm64Test, macosTest, nativeTest] of module 'macos', skipping linking
00:20.291 INFO :shared:compileMacosX64TestRelease Compiling module 'shared' for platform 'macosX64'...
00:20.296 INFO :macos:linkMacosArm64Release Linking native 'macosArm64' executable for module 'macos'...
00:20.376 INFO :shared:compileMacosArm64TestRelease Compiling module 'shared' for platform 'macosArm64'...
Build successful
suresh
08/15/2025, 3:25 PMFedor Ihnatkevich
08/15/2025, 3:57 PM