Repository navigation
Bump flutter-tvos to Flutter 3.47.4 - #82
Conversation
3.47.4 cherry-picked flutter/flutter#192301, which made LLDB.attachAndStart take a required IOSDeviceSupport. Upstream's hardcodes iOS DeviceSupport, and whenever it finds symbols LLDB sends 'platform select remote-ios --sysroot' before attaching. TvosDeviceSupport implements the interface against tvOS DeviceSupport, named from devicectl's productType, osVersionNumber and osBuildUpdate. It never reports a sysroot, so the lldb attach sequence on an Apple TV is unchanged from 3.47.3; it only drives the slow-attach warning, pointing at the tvOS directory and at .finalized rather than the lock files.
flutter-tvos 1.10.2 -> 1.10.3 flutter 3.47.3 -> 3.47.4 (9584c6713b324636289d067944a46fd6b49df14b) engine engine-87021d7a8cd67447b3e722a510bca8199d49f783 (unchanged)
234e09e to
c15f8c1
Compare
The README opened with a hand-maintained "Current version" block that the release train never touches, so it was already two releases behind. The tag names both versions (v<flutter>-tvos.<cli>), so a release badge says the same thing and cannot go stale; the block becomes a short "Versions" section explaining the scheme, and the header gains the logo, a test badge, the pub.dev version of flutter_tvos and links to the site, docs, plugins and Discussions. Issue forms ask for what CONTRIBUTING.md already asks for -- the CLI, macOS and Xcode versions, simulator or device, tvOS version -- so a bug report arrives reproducible. A plugin-port request has its own form, pointing at fluttertv/plugins and `flutter-tvos plugin port` first. Every GitHub release so far reads "See CHANGELOG.md". The release job now copies that version's CHANGELOG entry into the release body, and falls back to the link (with a warning) if the entry is missing, so a tag is never left without a release.
DenisovAV
left a comment
There was a problem hiding this comment.
Reviewed at cc59746 against upstream flutter_tools at 3.47.3 and 3.47.4, the #192301 cherry-pick and #189284.
The compile fix and the cli-only call are right: the 3.47.3 → 3.47.4 diff touches only packages/flutter_tools, so engine-87021d7a… still describes the engine. The release.yml notes extraction handles 1.10.3 vs 1.10.30, falls back cleanly, and passes the tag to the new step through env:. The issue forms are valid.
The points below are mostly about what the release notes will say, and since merging publishes v3.47.4-tvos.1.10.3 with this CHANGELOG entry as its body — and a re-run skips an existing release (release.yml:111-113) — they're cheapest to fix before merge.
Release notes and description
"the end-to-end matrix did not run for this release" (CHANGELOG.md:21-22). The description reports a full e2e.sh run, 23/23, including device debug, profile and release on an Apple TV 4K. As written, the release page will tell users this version got less validation than it did.
"the attach sequence on an Apple TV is the one 3.47.3 used" (CHANGELOG.md:33-34, tvos_device_support.dart:22-23, description). The sysroot step is skipped, but 3.47.4 changed the sequence in two other places that the tvOS path reaches, because it calls attachAndStart directly:
platform statusis now sent on every attach, blocking until lldb printsPlatform:(lldb.dart:162,:274-281). The device run shows this completes on Xcode 26.6, so it isn't a hang — but it is a new step.- The 60 s timer changed (
lldb.dart:131-145). WhenmissingSymbolsWarning()returns null it now callsprintErrorwith "file a bug including the verbose logs at https://github.com/flutter/flutter/issues/new".missingSymbolsWarningreturns null exactly when symbols are complete, andtvos_device.dart:444-445notes that tvOS attaches "can take well over a minute". So a user with correct Device Support and a slow tunnel gets an error sending them to flutter/flutter. Returning a tvOS-specific slow-tunnel message instead of null would keep it on our side.
"so the new TvosDeviceSupport path is the one that ran" (description). A fast attach doesn't exercise the class: missingSymbolsWarning is only called from the 60 s timer, and existingDeviceSupportSymbols is constant null. The run shows the new upstream attach sequence works on tvOS; it doesn't cover the directory naming or the warning.
The "Device debug on an Apple TV is unchanged…" entry sits under ### Fixed (CHANGELOG.md:24); it describes no fix.
Xcode 27
#189284 is that Xcode 27 writes iOS symbols to <device>/arm64e/Symbols, lldb's own lookup misses them, and launch hangs for minutes. Upstream's fix is existingDeviceSupportSymbols preferring <device>/<arch>/Symbols plus the remote-ios --sysroot step.
Keeping the sysroot off is reasonable — the command hardcodes remote-ios in a private method (lldb.dart:263-270), and the class doc already says selecting it for tvOS is untested. It does mean tvOS keeps relying on the lookup that broke for iOS. If Xcode 27 moves tvOS DeviceSupport the same way:
missingSymbolsWarningchecks only<device>/Symbols(tvos_device_support.dart:76), so a complete,.finalizedcopy would be reported as "Xcode has not finished preparing debugger support", and waiting in the Devices window would never clear it.- The attach would run into the 180 s limit and fall back to the Xcode debugger, which
tvos_device.dart:833-834says does not reliably sustain a tvOS session.
Nothing here shows whether tvOS gets the same layout — #189284 is iOS-only, and devicectl reports an A12 Apple TV as arm64, not arm64e. Not blocking this release, but worth an issue and one device run on the Xcode 27 beta; a real fix would mean overriding the sysroot step with remote-tvos, not just returning a path.
Related: 3.47.4 also warns when lldb logs libobjc.A.dylib is being read from process memory (devices.dart:940-952, missingSymbolsWarning(warnWhenSymbolsExist: true)). On tvOS lldb lines only go to printTrace (tvos_device.dart:763-764), and TvosDeviceSupport ignores warnWhenSymbolsExist (:68-79), so neither the missing-symbols nor the stale-copy case reaches the user.
Tests
The new tests cover TvosDeviceSupport in isolation; nothing covers how tvos_device.dart builds it or hands it to lldb. Each of these leaves dart test test/ at the same result:
| mutation | location |
|---|---|
modelCode: null |
tvos_device.dart:368 |
operatingSystemVersion: osVersion (the tvOS 26.6 23L773 string) |
tvos_device.dart:369 |
homeDirectory: null |
tvos_device.dart:365-367 |
pass TvosDeviceSupport(homeDirectory: null, modelCode: null, operatingSystemVersion: null) |
tvos_device.dart:800 |
drop the Symbols requirement, so .finalized alone counts as finished |
tvos_device_support.dart:76 |
All five silently turn off the slow-attach warning. A test that builds a TvosDevice from devicectl output and asserts deviceSupport.deviceDirectory would catch the first four.
Minor: the prepareDeviceSupport doc (:62-63) reads as if upstream's copy would run here if it weren't a no-op, but upstream's only caller is IOSDevice.startApp, which tvOS doesn't use.
Review follow-up on the 3.47.4 port. 3.47.4's slow-attach timer prints the Device Support warning, or, when missingSymbolsWarning returns null, an error asking the user to file a flutter/flutter bug. TvosDeviceSupport returned null exactly when the symbols were complete, which on an Apple TV means the wireless tunnel is the likely cause, not Flutter. It now always answers: missing or unfinished support with the directory, a slow network with the restart and timeout remedies, or, for a device it cannot identify, a message without a path. lldb's "libobjc.A.dylib is being read from process memory" line only reached the verbose log on tvOS. The attach is extracted into TvosDevice.attachLldb, which turns that line into a warning the way IOSDevice does, using warnWhenSymbolsExist to call a prepared copy stale and give the command to remove it. A finished copy also counts when the symbols sit one level down, the layout Xcode 27 uses for iOS (flutter/flutter#189284), so a complete copy is not reported as unfinished if tvOS follows. The sysroot step stays off; that is a separate question. Tests now cover the wiring, not only the class: the device builds its support from HOME, devicectl's model and the build-qualified version, attachLldb hands lldb that same object and surfaces the missing-symbols line, and a hung attach gives up at the timeout. Each of the five mutations raised in review, and dropping the new log hook, fails the suite. The CHANGELOG entry reported that the end-to-end matrix did not run and that the attach sequence was 3.47.3's. The matrix did run, on a simulator and an Apple TV, and 3.47.4's platform status step and new timer apply to tvOS; only the sysroot step is skipped. Both are corrected, and the entry that described no fix moves out of Fixed.
|
Thanks, all of it checked out. Addressed in d0ee1c4; description updated to match. Release notes
Slow attach with complete symbols.
Xcode 27. Opened #84 for the layout question, the beta device run and a Tests. 15 in
|
DenisovAV
left a comment
There was a problem hiding this comment.
Re-checked at d0ee1c4. 468 tests, analyzer clean, and all six mutations now fail: modelCode: null, operatingSystemVersion: null, homeDirectory: null, a fresh all-null TvosDeviceSupport passed to lldb, .finalized alone counting as prepared, and dropping the new log hook. The CHANGELOG, the class doc and the description now describe what the code does, _isPrepared accepting <device>/<arch>/Symbols covers the Xcode 27 layout question ahead of #84, and attachLldb keeps the timeout and arguments it replaced.
One interaction between the two new messages, from reading lldb.dart:
missingSymbolsWarning() never returning null means the 60 s timer always warns, and warning sets _warnedAboutMissingSymbols (lldb.dart:131-143). _ignoreLog then drops every later libobjc.A.dylib is being read from process memory line (:388-394) before it can reach the forwarder (:202, :217). So on any attach that passes a minute, the warnWhenSymbolsExist: true warning can no longer fire — and a slow attach is exactly when symbols are being read over the network.
What the user sees in that case is the prepared-copy message: "Debugger support for this Apple TV is in place, so the delay is most likely the wireless connection". A stale copy produces the same slow attach, and the message that would have named it is now suppressed.
Since the second warning may never arrive, the prepared-copy message is the only place that can say it: naming the stale copy as the other cause, with the same rm -rf, would cover it. Independently of that, :202 only forwards after the attach completes, so the hook covers symbol reads during the run, not during the attach.
Approving — this is one message's wording, and the behaviour it guards is the same as before this PR.
Once LLDB's one-minute timer prints a warning it sets _warnedAboutMissingSymbols, and _ignoreLog then drops every later "libobjc.A.dylib is being read from process memory" line before it reaches the forwarder. With missingSymbolsWarning() never returning null, the timer always warns, so on a slow attach the stale-copy warning can no longer follow -- and a stale copy is one cause of a slow attach. The prepared-copy message is the only one a slow attach gets, so it now names both causes: the wireless connection first, and, if it is slow every time, a stale copy with the rm -rf to remove it. LLDB also forwards log lines only after attaching, so the log hook covers symbol reads during the run, not during the attach. The attachLldb doc, the missingSymbolsWarning doc and the CHANGELOG say so.
|
Right, confirmed in
468 tests pass, analyzer clean. |
Flutter 3.47.4 cherry-picked flutter/flutter#192301, which made
LLDB.attachAndStarttake a requiredIOSDeviceSupport. The release train re-pinneddevand stopped at compile:The port cannot land ahead of the re-pin (the parameter does not exist in 3.47.3), so this carries both, in the same shape the train produces: 1.10.2 → 1.10.3, engine pin unchanged.
The port
Upstream's
IOSDeviceSupporthardcodes~/Library/Developer/Xcode/iOS DeviceSupport.LLDB.attachAndStartuses it for two things:platform select remote-ios --sysroot <symbols>whenever it finds symbols, and the message printed when the attach passes one minute. 3.47.4 also added aplatform statusstep to every attach, which does not depend on the class and runs on tvOS as on iOS.TvosDeviceSupport(new,lib/tvos_device_support.dart) implements the interface for Apple TV:tvOS DeviceSupport/<model> <version> (<build>), named from devicectl'sproductType,osVersionNumberandosBuildUpdate. Checked against a real device:AppleTV14,1 26.6 (23L773)is the directory Xcode created.existingDeviceSupportSymbolsis always null, so lldb is never sent theremote-iossysroot for an Apple TV and finds tvOS symbols on its own, as on 3.47.3. The rest of 3.47.4's attach sequence applies unchanged.missingSymbolsWarningnever returns null, because upstream turns null into an error asking for a flutter/flutter bug. It reports missing or unfinished support with the directory (.finalizedplusSymbolsmarks a finished copy, directly or one level down, the Xcode 27 iOS layout), a likely slow wireless connection when the copy is complete, or a path-less message when the device cannot be identified. WithwarnWhenSymbolsExistit calls a complete copy stale and gives therm -rfto remove it.prepareDeviceSupportis a no-op; upstream only calls it fromIOSDevice.startApp.TvosDevice.attachLldb(extracted fromstartApp) makes the attach call with the device's own support, keeps the attach timeout, and turns lldb'slibobjc.A.dylib is being read from process memoryline into a warning, asIOSDevicedoes. It used to reach only the verbose log.Verified
Against Flutter 3.47.4, at
2d7f31e:bin/flutter-tvos --versioncompiles and startsdart analyze --fatal-infos lib/ test/ bin/: no issues;packages/flutter_tvosflutter analyze --fatal-infos: no issuesdart test test/: 468 passed, 15 of them intvos_device_support_test.dart. Beyond the class, they cover the device building its support fromHOMEand devicectl output,attachLldbhanding lldb that same object and surfacing the missing-symbols line, and a hung attach giving up at the timeout. Each of the five mutations from review, and dropping the log hook, fails the suite.End-to-end, run locally with
release-train/tools/e2e.shagainstc15f8c1(before the review changes): engine artifacts verified; sim-debug 10/10; on an Apple TV 4K (tvOS 26.6, Xcode 26.6) device-debug 10/10 including hot reload and hot restart taking effect, device-profile and device-release passing with all 10 FFI symbols exported. 23 passed, 0 failed. The debug run attached through lldb without falling back to the Xcode debugger, which shows 3.47.4's attach sequence works on tvOS. It attached in under a minute, so it did not exercise the slow-attach messages; those are covered by the unit tests. The review changes move the attach call intoattachLldbwithout changing its arguments or timeout.Also in this PR: the repository front page
Folded in from #83 so it ships with the same release. Docs and workflow only, no code:
dev,flutter_tvoson pub.dev, license) and a link row. The hand-maintained "Current version" block, which the train never updates, is replaced by a "Versions" section explaining thev<flutter>-tvos.<cli>tag, so the release badge is the source of truth.flutter-tvos --version, macOS, Xcode, simulator/device, tvOS version, build mode), plugin port request, feature request, and routing for questions and security reports.release.yml: the GitHub release body is now that version's CHANGELOG entry with a Flutter/CLI footer, falling back to the link with a warning. Verified against the current CHANGELOG with the realv3.47.3-tvos.1.10.2tag. This release,v3.47.4-tvos.1.10.3, is the first to use it.doc/assets/flutter-tvos-logo.png, transparent so it works on both GitHub themes.Merging releases
v3.47.4-tvos.1.10.3.