$ the-wire · showcase
Flutter tools sheds global state, Swift fixes miscompiles
By RepoJournal · Filed · About Mobile platforms · Composed from the cited sources · methodology
Flutter's flutter_tools continued its multi-year migration off ambient globals, Swift's compiler landed four correctness fixes for silently wrong lifetimes and calls, and Kotlin's Analysis API deprecates its last legacy diagnostics entry point.
[flutter_tools] Inject CrashReportSender into SwiftPM migration flutter/flutter
SwiftPackageManagerIntegrationMigration used to construct a CrashReportSender with an unmocked http.Client(), so the validate project settings tests fired live HTTPS POSTs to https://clients2.google.com/cr/report and timed out the tool_tests_general presubmit whenever the endpoint took more than 2 seconds. The sender is now injected, which takes that network dependency out of the test path.
[Analysis API] Deprecate `collectDiagnostics` and `KaDiagnosticCheckerFilter` JetBrains/kotlin
collectDiagnostics(filter) is now equivalent to diagnostics().withCheckers(...).toList(), and the default ONLY_COMMON_CHECKERS needs no modifier, so the closed KaDiagnosticCheckerFilter enum gives way to a set of KaDiagnosticCheckerKinds. Plugins calling the legacy endpoint should port now, since it is deprecated rather than removed.
[cxx-interop] Do not attempt `objc_retain` on a C++ FRT apple/swift
Swift called objc_retainAutoreleasedReturnValue on C++ foreign reference types returned from functions annotated CF_RETURNS_NOT_RETAINED, and the program crashed inside objc_retain. The compiler now recognizes the C++ FRT return and emits no objc_ calls for it.
MoveOnlyChecker: Don't destroy inout or local variables before end of dead end apple/swift
MoveOnlyChecker could insert a destroy_addr on an inout parameter or local after its last use in a dead end block ending in unreachable, shortening a lifetime that is expected to be alive at function exit. When the address is not reinitialised in that block, the destroy_addr is now deferred to the first block that reinitialises it.
[flutter_tools] Migrate general.shard Android, asset, and build tests off globals (#196125) flutter/flutter
The rest of the day is internal churn: ben konyi also moved fuchsia_tester.dart and the general.shard Android, asset, and build tests off globals, Flutter stopped SliverCrossAxisGroup from asserting on zero cross-axis extent, Swift added initial lifetime checks for class initializers, and Kotlin renamed ignoreSuppressed to includingSuppressed.