The Wire · Showcase
SWIFT MACRO IMPORTS AND KOTLIN CLASS INITIALIZATION FIXES SHIP ACROSS PLATFORMS
By RepoJournal · Filed · About Mobile platforms
Swift's ClangImporter gains APINotes-driven macro customization while Kotlin standardizes NoClassDefFoundError behavior across JVM and native targets.
Swift is reshaping how macros import from C headers, with ClangImporter now supporting APINotes-driven renaming and type overrides [1]. This closes a long-standing gap in macro flexibility, letting frameworks customize imports without source changes. Meanwhile, Kotlin ships a cross-platform fix: NoClassDefFoundError now appears on non-JVM targets [2], matching JVM behavior when class initialization fails [3]. The Kotlin runtime function has been renamed to align with this new exception [6], ensuring consistent error messages across all platforms [7]. On the Swift side, error messages got tighter too, with switch case notes consolidated into a single diagnostic [4]. And embedded concurrency took a step forward: recursive and non-recursive mutex implementations split apart [5], letting platforms optimize each path independently.
One email a day. Unsubscribe in one click.
Keep up with Mobile platforms in about 3 minutes a day: what actually shipped — the commits, pull requests, releases, and security advisories that matter.
One email a day. Unsubscribe in one click. Read a past issue →
Action items
- → Verify Swift projects using ClangImporter review APINotes macro customizations apple/swift [plan]
- → Update Kotlin/Native projects expecting class initialization errors to use new exception handling JetBrains/kotlin [plan]
- → Monitor Flutter autoroller for Skia and Fuchsia SDK integration issues flutter/flutter [monitor]
References
- [1] ClangImporter: support reshaping macros on import ↗ apple/swift
- [2] [stdlib] Introduce kotlin.NoClassDefFoundError on non-JVM targets ↗ JetBrains/kotlin
- [3] [stdlib] Introduce kotlin.NoClassDefFoundError on non-JVM targets JetBrains/kotlin
- [4] [Sema] Consolidate missing switch case notes ↗ apple/swift
- [5] [Embedded PAL] Split the recursive mutex entrypoints out from the non-recursive ones ↗ apple/swift
- [6] [K/N] Rename the `ThrowFileFailedToInitializeException` runtime function JetBrains/kotlin
- [7] [K/N] Use the name of the class in NoClassDefFoundError JetBrains/kotlin