Retarget the CLI to Flutter 3.32.8 - #69
Closed
DenisovAV wants to merge 1 commit into
Closed
Conversation
Pinning flutter.version to 3.32.8 left the tool uncompilable: it is written against a newer flutter_tools than that release ships. Five incompatibilities, resolved in the direction of what 3.32.8 actually provides. - `copyAssets` predates `dartHookResult`, and `DartHooksResult` / `DartBuild.loadHookResult` do not exist. Dropped — we already skip the native-assets targets for tvOS and write an empty manifest ourselves, so there were never build-hook results to pass on. - `src/ios/lldb.dart` does not exist yet, so the lldb JIT attach (Path 1 of the device debug flow) cannot be built. Removed it and fall through to the Xcode debugger, which this file already implements as Path 2 and which is the same mechanism stock Flutter uses for iOS Core Devices. - `Device.isSupported` is synchronous here, not `Future<bool>`. - `UpdatePackagesCommand` takes no constructor arguments here. - The generated Dart plugin registrant hardcoded `// @Dart = 3.9`, which the 3.8.1 SDK rejects outright. Now derived via `currentLanguageVersion`, so it tracks whatever Flutter is pinned instead of breaking on the next move in either direction. Two tests asserted things specific to the newer SDK: the `informative` development artifact, which does not exist in this release, and `writePackageConfigFiles`, which is `writePackageConfigFile` here. Verified: creates a project, builds it for the simulator in both debug and release, `dart analyze` clean, 346/346 tests pass. Device debug on a physical Apple TV is not available on this line — see the PR description.
Contributor
Author
|
Closing: targeting Splitting instead: the one version-agnostic fix here (deriving the plugin registrant's language version instead of hardcoding |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pinning
flutter.versionto 3.32.8 left the tool uncompilable — 15 errors. The CLI is written against a newerflutter_toolsthan 3.32.8 ships. This resolves all of them in the direction of what 3.32.8 actually provides.The five incompatibilities
application.dartDartHooksResult,DartBuild.loadHookResult,copyAssets(dartHookResult:)tvos_device.dartsrc/ios/lldb.dartentirelytvos_device.dartDevice.isSupportedis sync hereboolinstead ofFuture<bool>executable.dartUpdatePackagesCommand(verboseHelp:)tvos_plugins.dart// @dart = 3.9; Dart 3.8.1 rejects itThe last one only surfaced at build time, not compile time, and is the one worth keeping an eye on: it is now derived via
currentLanguageVersion(...)rather than hardcoded, so it tracks whatever Flutter is pinned instead of breaking on the next move in either direction.Two tests asserted newer-SDK specifics: the
informativedevelopment artifact (absent here) andwritePackageConfigFiles(writePackageConfigFilehere).Device debug is not available on this line
Worth stating plainly, because it is blocked twice over and neither is fixed here:
flutter_toolsgained the LLDB helper after 3.32.8, so Path 1 of the device debug flow cannot be built at all.v1.0.1-flutter3.32.8engine carries both the RWX marker and Dart'sMust run with --write-protect-codeassertion — verified by inspecting the shipped binary.CheckIfNeedDebuggerHelpWithRX()FATALs when the flag is off on a new enough OS, which is exactly the state our own01-dart-globals.patchcreates.On (2) I could not verify one link:
IsAtLeastIOS18_4()'s definition is not in the pinned Dart tree where it is used, so whether it returns true on tvOS 26 rests on the abort reported in the engine README rather than on code I read. Also noteflutter3.32.8/patches/contains no!defined(DART_HOST_OS_TVOS)exclusion, whileflutter3.44.8/patches/does — so the claim in the engine README that the archived set carries this fix looks wrong and is worth its own issue.The Xcode debugger fallback remains, and the simulator is unaffected (JIT works there without a debugger).
Verified
flutter-tvos --version→ Flutter 3.32.8 • Dart 3.8.1create --platforms=tvos→ project generatedbuild tvos --simulator --debug→ Xcode build done, 17.6sbuild tvos --simulator --release→ Xcode build done, 17.5s (AOT + icon tree-shake)dart analyze lib/→ 0 errors, 0 warnings (250 pre-existingalways_specify_typesinfos, in untouched files)flutter test→ 346/346 passFollow-up, not fixed here
tool_revision()inbin/internal/shared.shreturns the git HEAD SHA in a git checkout, so uncommitted edits underlib/never invalidate the snapshot — the file-hashing fallback only runs for non-git checkouts. Editing the tool and re-running it silently executes the old snapshot.