$ the-wire · showcase
Swift and Kotlin compiler fixes land, Flutter dependency rolls continue
By RepoJournal · Filed · About Mobile platforms
Swift fixes a C++ interop crash and extends an optimization, Kotlin begins a refactor of compiler-required arguments, and Flutter churns through routine dependency rolls.
Swift's C++ interop now imports templated static function members annotated as constructors via `SWIFT_NAME` without crashing. The patch updates `importGlobalAsInitializer` to support templates, fixing an assertion failure. [1] Separately, the `CopyToBorrowOptimization` now extends the borrow scope of the load's base reference before converting a `load [copy]` into a `load_borrow`, which "enables the optimization in more cases" and fixes invalid `load_borrow` creation when the base's borrow scope ends in a reborrow. [2] A new `MemoryLayout<T>.typedAllocationID` was merged for typed allocation, supporting Embedded Swift. [3]
Kotlin's compiler team is reworking how compiler-required annotation arguments are resolved. A new DSL declares parameters like name, annotation, position, and expected enum class; currently, only enums and strings are valid as compiler-required values. [4] The resolution logic was refactored [5] and reworked [6] to handle these arguments more cleanly. A test commit indicates non-literals in `JvmName` are now disallowed, though the behavior change is not yet part of a release. [7] This refactoring sets up future diagnostics for non-literal arguments on `Deprecated`'s `level` parameter.
Flutter's engine is running routine dependency rolls: Dart SDK to version 3.14.0-201.0.dev [8], Skia with a Vulkan-deps update [9], and the Fuchsia Linux SDK [10]. These are automated, low-risk updates.
Action items
- → Monitor Swift's C++ interop fix for templated `SWIFT_NAME` constructors in your next toolchain update apple/swift [monitor]
- → Watch for Kotlin compiler behavior changes on non-literal compiler-required arguments in upcoming releases JetBrains/kotlin [monitor]
References
- [1] [cxx-interop] Correctly import function templates as initializers ↗ apple/swift
- [2] CopyToBorrowOptimization: extend the borrow scope of the load's base reference ↗ apple/swift
- [3] Add MemoryLayout<T>.typedAllocationID for typed allocation / Embedded Swift (#91962) ↗ apple/swift
- [4] [FIR] Introduce small DSL to declare compiler-required annotation params ↗ JetBrains/kotlin
- [5] [FIR] Compiler required arguments refactor ↗ JetBrains/kotlin
- [6] [FIR] Rework resolution of compiler-required _arguments_ ↗ JetBrains/kotlin
- [7] [Tests] Fix compilation after disallowing non-literals in `JvmName` ↗ JetBrains/kotlin
- [8] Roll Dart SDK from 6882c3b4b542 to 77094991d1c1 (1 revision) (#192339) ↗ flutter/flutter
- [9] Roll Skia from 10652f9d64d6 to db200e27a634 (1 revision) (#192338) ↗ flutter/flutter
- [10] Roll Fuchsia Linux SDK from FgDQeF6jb1dVRVh3K... to _IgixhH4vEgdz9Oqn... (#192333) ↗ flutter/flutter