The Wire · Showcase
SWIFT FIXES CRASH ON NON-COPYABLE EXISTENTIALS
By RepoJournal · Filed · About Mobile platforms
A Swift compiler crash that hit local non-copyable existentials is patched, and the fix clears the way for broader adoption of move-only types.
The Swift move checker was crashing whenever a local `let` or `var` held a non-copyable existential, a bug rooted in how initialization status computed the existential payload's fields [1]. The same series of PRs lets `type(of:)` borrow its argument instead of copying it, so it now works on non-copyable values and existentials [2]. Boxed Error existentials also get typed allocation [3], and deserialization no longer aborts on conformance witnesses that cross-reference unloaded modules, recovering with an opaque witness and surfacing a proper error at the use site instead [4]. On the Flutter side, the WebAssetServer now restricts source resolution to source map extensions, aligning with ReleaseAssetServer and stopping raw project files from leaking into debug responses [5]. Flutter also made Dart SDK extraction atomic by staging into a temp directory first, so an interrupted download won't corrupt `bin/cache/dart-sdk` [6]. Kotlin's commonizer task no longer reads `Task.project`, which unblocks configuration cache and Isolated Projects for native builds [7]. Kotlin reflection replaced `lazySoft` with `lazy(PUBLICATION)` in many places, a subtle but welcome change for consistency [8]. With 62 commits and 54 PRs across the three repos, this is a steady day of hardening and groundwork, not flashy features. Start with the Swift crash fix if you're using non-copyable existentials, then look at the Flutter source resolution tightening before your next debug run.
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
- → Update your Swift toolchain to include the crash fix for non-copyable existentials apple/swift [immediate]
- → Review Flutter web debug builds for source map resolution changes flutter/flutter [monitor]
- → Test Kotlin native builds with configuration cache enabled JetBrains/kotlin [plan]
References
- [1] [any ~Copyable] Don't crash when using local ~C existentials ↗ apple/swift
- [2] [any ~Copyable] Support type(of:) on non-copyable values ↗ apple/swift
- [3] Implement typed allocation for boxed Error existentials ↗ apple/swift
- [4] serialization: emit proper diagnostics for conformance witnesses that reference unloaded modules instead of crashing ↗ apple/swift
- [5] [flutter_tools] Restrict WebAssetServer source resolution to source map extensions (#191501) flutter/flutter
- [6] tools: Extract Dart SDK to temp directory before moving to final location (#191263) flutter/flutter
- [7] [KGP] Wire commonized cinterops without reading Task.project JetBrains/kotlin
- [8] Reflection: replace lazySoft with lazy(PUBLICATION) in many places ↗ JetBrains/kotlin