Rey (Kingg22)
07/28/2026, 1:23 PMkeepLocallyUnsupportedTargets is supposed to work.
My project has these native targets:
kotlin {
@OptIn(ExperimentalAbiValidation::class)
abiValidation {
keepLocallyUnsupportedTargets.set(true)
}
linuxX64()
macosArm64()
mingwX64()
}
I generate and update the ABI dump on an Apple Silicon Mac, so the reference dump contains:
// Targets: [linuxX64, macosArm64, mingwX64]
However, when GitHub Actions runs on Ubuntu, I get: github.com/kingg22/kogot/…/90285638164
w: ABI Validation: unsupported target
Target macosArm64 is not supported by the host compiler and a KLib ABI dump could not be directly generated for it.
and then checkKotlinAbi fails because the generated dump becomes:
- // Targets: [linuxX64, macosArm64, mingwX64]
+ // Targets: [linuxX64, mingwX64]
So it looks like macosArm64 is dropped from the dump header even though keepLocallyUnsupportedTargets is enabled or disabled.
From the documentation I understood that this option should preserve unsupported targets by taking their declarations from the reference dump, so I expected checkKotlinAbi to succeed on Linux.
Am I configuring this incorrectly, or is this current behavior expected? Is there a recommended way to run ABI validation in a multiplatform project without requiring a macOS runner for every CI build?
Thanks!Filipp Zhinkin
07/28/2026, 3:37 PMSergey Shanshin
07/28/2026, 4:31 PMSergey Shanshin
07/28/2026, 4:52 PMkotlin-native/api/annotations/build.gradle.kts code like this:
tasks.configureEach {
if (name == "internalDumpKotlinAbi") {
outputs.upToDateWhen { false }
}
}Rey (Kingg22)
07/28/2026, 5:07 PMSergey Shanshin
07/28/2026, 5:14 PMkotlin.internal.abi.validation.klib.targets.disabled.for.testing=macosArm64 - it gives the same result as unsupport by the compilerRey (Kingg22)
07/28/2026, 5:38 PMRey (Kingg22)
07/30/2026, 10:42 AMAlso, I tried reproduce it locally on commit dec3006c it's also ok.
At first, you can try to disable the build cache for the dump task by adding to theHiii, I just tested it on Linux Mint and it fails on the same commit, whether I enable or disable keepLocally option, and always with the same error.code like this:kotlin-native/api/annotations/build.gradle.kts
ABI check failed for project annotations
<<<ABI has changed>>>
--- /home/kingg22/IdeaProjects/kogot/kotlin-native/api/annotations/api/annotations.klib.api
+++ /home/kingg22/IdeaProjects/kogot/kotlin-native/api/annotations/build/kotlin/abi/annotations.klib.api
@@ -1,5 +1,5 @@
// Klib ABI Dump
-// Targets: [linuxX64, macosArm64, mingwX64]
+// Targets: [linuxX64, mingwX64]
// Rendering settings:
// - Signature version: 2
// - Show manifest properties: true
You can run ':kotlin-native:api:annotations:updateKotlinAbi' task to create or overwrite reference ABI declarations
Could you try it on a non-Mac computer or in a GH Actions instance? And if you can use the same repository, that would be better, in case it's a configuration error on my part, a conflict with another function, or something experimental. Thank uSergey Shanshin
07/30/2026, 12:28 PMRey (Kingg22)
07/30/2026, 12:50 PMFilipp Zhinkin
07/31/2026, 8:27 PM