Skip to content

Commit 0cd616e

Browse files
authored
fix(macos): disable Impeller pending upstream crash fix (#107)
Restore Skia on macOS while flutter/flutter#185394 remains unresolved, enforce the resolved release plist setting, and document the temporary release invariant.
1 parent 2fdceeb commit 0cd616e

5 files changed

Lines changed: 53 additions & 0 deletions

File tree

‎client/macos/Runner/Info.plist‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
<string>$(FLUTTER_BUILD_NUMBER)</string>
2323
<key>LSMinimumSystemVersion</key>
2424
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
25+
<key>FLTEnableImpeller</key>
26+
<false/>
2527
<key>NSHumanReadableCopyright</key>
2628
<string>$(PRODUCT_COPYRIGHT)</string>
2729
<key>NSMainNibFile</key>

‎client/release/macos/build_macos_dmg.sh‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,16 @@ if [ "${SANAD_SKIP_BUILD:-0}" != "1" ]; then
4040
fi
4141
test -d "$APP_PATH"
4242

43+
IMPELLER_SETTING="$(
44+
/usr/libexec/PlistBuddy \
45+
-c 'Print :FLTEnableImpeller' \
46+
"$APP_PATH/Contents/Info.plist" 2>/dev/null || true
47+
)"
48+
if [ "$IMPELLER_SETTING" != "false" ]; then
49+
echo "macOS release must disable Impeller while flutter/flutter#185394 remains unresolved." >&2
50+
exit 1
51+
fi
52+
4353
while IFS= read -r binary; do
4454
architectures="$(lipo -archs "$binary")"
4555
if [[ " $architectures " != *" arm64 "* ]] ||

‎client/test/tool/desktop_window_contract_test.dart‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,18 @@ void main() {
8585
expect(titleBar, contains('WindowManagerService.toggleMaximized'));
8686
});
8787

88+
test('macOS deployment disables Impeller while the upstream crash remains unresolved', () {
89+
final infoPlist = File('macos/Runner/Info.plist').readAsStringSync();
90+
91+
final releaseScript = File(
92+
'release/macos/build_macos_dmg.sh',
93+
).readAsStringSync();
94+
95+
expect(infoPlist, contains('<key>FLTEnableImpeller</key>\n\t<false/>'));
96+
expect(releaseScript, contains("-c 'Print :FLTEnableImpeller'"));
97+
expect(releaseScript, contains(r'if [ "$IMPELLER_SETTING" != "false" ]'));
98+
});
99+
88100
test('supported native runners enforce the same minimum dimensions', () {
89101
final macOS = File('macos/Runner/MainFlutterWindow.swift').readAsStringSync();
90102
final windows = File('windows/runner/win32_window.cpp').readAsStringSync();
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Task 81: macOS Impeller Crash Mitigation
2+
3+
## Goal
4+
5+
Prevent the Flutter 3.47 macOS Client from using Impeller while upstream issue
6+
`flutter/flutter#185394` remains unresolved, restoring the prior Skia rendering
7+
path for installed macOS users.
8+
9+
## Gates
10+
11+
- [x] **G1 — Configuration:** Set `FLTEnableImpeller` to `false` in the macOS Client `Info.plist` without changing other platforms.
12+
- [x] **G2 — Regression Contract:** Add a focused source-level test that fails if the deployment opt-out is removed accidentally.
13+
- [x] **G3 — Documentation:** Record the temporary macOS release invariant and the condition for re-enabling Impeller.
14+
- [x] **G4 — Local Verification:** Pass the focused test and Flutter static analysis.
15+
- [x] **G5 — Hosted PR Verification:** Open a focused pull request and require all hosted checks to pass before merge.
16+
- [ ] **G6 — Post-Merge Soak and Release:** Before preparing a patch release, run the macOS Client for approximately one day across resize, compact/restore, background/foreground, and sleep/wake transitions without recurrence.
17+
18+
## Acceptance Criteria
19+
20+
- The built macOS application resolves `FLTEnableImpeller` to `false`.
21+
- Windows, Linux, Android, iOS, and Web rendering configuration is unchanged.
22+
- A focused automated test protects the source configuration.
23+
- Impeller is not re-enabled until an upstream stable Flutter engine fix is available and passes macOS soak verification.

‎docs/qa_maintenance/release_verification.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,12 @@ alternative.
5353

5454
## Platform matrix
5555

56+
Until `flutter/flutter#185394` is fixed in a stable Flutter engine and passes a
57+
macOS foreground/resize soak, the macOS Client release must set
58+
`FLTEnableImpeller` to `false` in its resolved application `Info.plist`. Release
59+
verification must inspect the built `.app`, not only the source plist, so a
60+
build-setting override cannot silently re-enable the affected Metal path.
61+
5662
| Target | Local evidence | Hosted or clean-machine evidence still required |
5763
|---|---|---|
5864
| Agent macOS arm64/x64 | compilation, version, architecture, Developer ID verification, accepted notary log with exact architecture/`cdhash` ticket match | both hosted runners, clean install, real upgrade and rollback |

0 commit comments

Comments
 (0)