$ the-wire · showcase
Flutter tooling moves to modular dependency injection, Swift compiler updates and Kotlin Native drops macOS x64 from crossdist
By RepoJournal · Filed · About Mobile platforms
Flutter's command-line tooling continues its migration to modular dependency injection with breaking constructor changes, while Swift lands diagnostics and optimization fixes and Kotlin Native removes macOS x64 from release crossdist.
Flutter's tooling migration to modular dependency injection continues, with breaking constructor changes across multiple commands. EmulatorsCommand now requires non-nullable Doctor, EmulatorManager, and ToolContext with zero global fallbacks [1]. BuildIOSCommand and BuildIOSArchiveCommand (flutter build ios, flutter build ipa) now take ToolContext, AppleContext, and BuildSystem, eliminating direct dependencies on globals.dart [2]. But note: the migration also affects AnalyzeCommand, DoctorCommand, IdeConfigCommand, and ShellCompletionCommand [3], Desktop build subcommands including BuildWindowsCommand and BuildLinuxCommand [4], and DaemonCommand and DebugAdapterCommand (DAP) [5]. These changes are breaking for anyone constructing these commands directly.
The Swift compiler improves diagnostics for implicitly unwrapped optionals (IUO) used as witnesses for optional protocol requirements. Previously the error showed a generic type mismatch, and a C declaration imported as an IUO printed its type as Type? in the diagnostic instead of Type!, making the message confusing. Now the diagnostic is clearer [6]. Additionally, a fix ensures that class inherited properties are included in typed allocation descriptor computation, addressing a bug where they were missing [7]. Also, while hoisting array bounds checks, the compiler now disqualifies a non-trivial store to an alloc_stack as a safe instruction. A store to a non-trivial alloc_stack holding Array<T> can replace it with a smaller array, so hoisting could be unsafe. This does not affect Span or InlineArray [8].
Kotlin Native removes macOS x64 from crossdist distribution, a breaking change for those relying on macOS x64 artifacts being published there [9]. Additionally, stale targets are removed from the linkage package, with an integration test repro added, which may affect Kotlin/Native linkage compatibility [10]. The Swift compiler also disables FRTInfo caching during NameImporter to prevent stale cache entries, which matters for Swift/C++ interop PCM building; this doesn't change behavior for end users but reduces the risk of stale results [11].
Further cleanups include Kotlin Analysis API dependency removal [12] and redundant pop utility usage removal [13], plus a fix in Swift's file-level defaults that replaces a wrong ASSERT with an error and adds a null check for getMainActorType() when concurrency is disabled [14]. These are routine internal changes but maintain the health of the toolchains.
Action items
- → Update any direct construction of flutter tool commands to the new constructor signatures flutter/flutter [immediate]
- → Check Kotlin/Native consumers that expect macOS x64 crossdist artifacts JetBrains/kotlin [plan]
- → Monitor swift compiler release notes for diagnostics and optimization fixes apple/swift [monitor]
References
- [1] [tool] Migrate EmulatorsCommand to modular dependency injection (#190769) ↗ flutter/flutter
- [2] [tool] Migrate BuildIOSCommand and BuildIOSArchiveCommand to modular dependency injection (#192250) ↗ flutter/flutter
- [3] [tool] Migrate Tooling and Analysis commands to modular dependency injection (#190788) ↗ flutter/flutter
- [4] [tool] Migrate Desktop build subcommands and toolchain to modular dependency injection (#190781) ↗ flutter/flutter
- [5] [tool] Migrate DaemonCommand and DebugAdapterCommand to modular dependency injection (#190793) ↗ flutter/flutter
- [6] Sema: Improve diagnostics when an IUO witness conflicts with its requirement ↗ apple/swift
- [7] Include class inherited properties in typed allocation descriptors ↗ apple/swift
- [8] Disqualify non-trivial store to an alloc_stack as a safe instruction while hoisting array bounds checks ↗ apple/swift
- [9] [Native] remove macos x64 from crossdist ^KT-84955 ↗ JetBrains/kotlin
- [10] [KT-82823] Remove stale targets from the linkage package ↗ JetBrains/kotlin
- [11] [cxx-interop] Do not cache FRTInfo during NameImporter ↗ apple/swift
- [12] [Analysis API] remove unused dependencies ↗ JetBrains/kotlin
- [13] [Analysis API] remove redundant usage of `pop` utility ↗ JetBrains/kotlin
- [14] [Sema] Fix implementation issues, add tests, remove top of file requirement for file-level defaults ↗ apple/swift