Sitelet https://github.com/flutter-tizen/flutter/pull/4
Skip to content

Update Flutter 3.29.3 - #4

Closed
JSUYA wants to merge 5 commits into
flutter-tizen:flutter-3.29.3from
JSUYA:flutter-3.29.3-candidate.0
Closed

JSUYA wants to merge 5 commits into
flutter-tizen:flutter-3.29.3from
JSUYA:flutter-3.29.3-candidate.0

Conversation

@JSUYA

@JSUYA JSUYA commented Apr 16, 2025

Copy link
Copy Markdown
Member

@JSUYA JSUYA closed this May 22, 2025
JSUYA pushed a commit that referenced this pull request Sep 9, 2025
Fixes error found in rolling to google.

```
[☠] Android toolchain - develop for Android devices (the doctor check crashed)
    ✗ Due to an error, the doctor check did not complete. If the error message
      below is not helpful, please let us know about this issue at
      https://github.com/flutter/flutter/issues.
    ✗ type 'Null' is not a subtype of type 'String' of 'executable'
    • #0      LocalProcessManager.canRun
      (package:process/src/interface/local_process_manager.dart:124)
      #1      getEmulatorVersion
      (package:flutter_tools/src/android/android_workflow.dart:64)
      #2      AndroidValidator.validateImpl
      (package:flutter_tools/src/android/android_workflow.dart:200)
      #3      DoctorValidator.validate
      (package:flutter_tools/src/doctor_validator.dart:58)
      #4      Doctor.startValidatorTasks.<anonymous closure>
      (package:flutter_tools/src/doctor.dart:244)
      #5      asyncGuard.<anonymous closure>
      (package:flutter_tools/src/base/async_guard.dart:109)
      #6      _rootRun (dart:async/zone.dart:1525)
      #7      _CustomZone.run (dart:async/zone.dart:1422)
      #8      _runZoned (dart:async/zone.dart:2033)
      #9      runZonedGuarded (dart:async/zone.dart:2019)
      #10     runZoned (dart:async/zone.dart:1952)
      #11     asyncGuard (package:flutter_tools/src/base/async_guard.dart:106)
      #12     Doctor.startValidatorTasks
      (package:flutter_tools/src/doctor.dart:234)
      #13     Doctor.diagnose (package:flutter_tools/src/doctor.dart:372)
      #14     DoctorCommand.runCommand
      (package:flutter_tools/src/commands/doctor.dart:59)
      #15     FlutterCommand.verifyThenRunCommand
      (package:flutter_tools/src/runner/flutter_command.dart:1897)
      <asynchronous suspension>
      #16     FlutterCommand.run.<anonymous closure>
      (package:flutter_tools/src/runner/flutter_command.dart:1551)
      <asynchronous suspension>
      #17     AppContext.run.<anonymous closure>
      (package:flutter_tools/src/base/context.dart:154)
      <asynchronous suspension>
      #18     CommandRunner.runCommand (package:args/command_runner.dart:212)
      <asynchronous suspension>
      #19     FlutterCommandRunner.runCommand.<anonymous closure>
      (package:flutter_tools/src/runner/flutter_command_runner.dart:501)
      <asynchronous suspension>
      #20     AppContext.run.<anonymous closure>
      (package:flutter_tools/src/base/context.dart:154)
      <asynchronous suspension>
      #21     FlutterCommandRunner.runCommand
      (package:flutter_tools/src/runner/flutter_command_runner.dart:438)
      <asynchronous suspension>
      #22     run.<anonymous closure>.<anonymous closure>
      (package:flutter_tools/runner.dart:98)
      <asynchronous suspension>
      #23     AppContext.run.<anonymous closure>
      (package:flutter_tools/src/base/context.dart:154)
      <asynchronous suspension>
      #24     AppContext.run.<anonymous closure>
      (package:flutter_tools/src/base/context.dart:154)
      <asynchronous suspension>
      #25     run (package:mobile.flutter.cli/flutter_tools.dart:106)
      <asynchronous suspension>
      #26     main (google3:///mobile/flutter/cli/bin/cli_usage_aot.dart:4)
```

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
xiaowei-guan pushed a commit to xiaowei-guan/flutter that referenced this pull request Jan 22, 2026
This test passes when run locally as instructed in the README for the
devicelab
```
../../bin/cache/dart-sdk/bin/dart bin/test_runner.dart test -t android_verified_input_test
```

but fails on CI:

https://ci.chromium.org/ui/p/flutter/builders/staging/Linux_pixel_7pro%20android_verified_input_test/106/overview
```
[2025-11-03 11:08:04.090018] [STDOUT] stdout: [        ]   Original error: ext.flutter.driver: (-32000) Service connection disposed
[2025-11-03 11:08:04.090156] [STDOUT] stdout: [        ]   Original stack trace:
[2025-11-03 11:08:04.090199] [STDOUT] stdout: [        ]   #0      new _OutstandingRequest (package:vm_service/src/vm_service.dart:268:34)
[2025-11-03 11:08:04.091572] [STDOUT] stdout: [        ]   #1      VmService._call.<anonymous closure> (package:vm_service/src/vm_service.dart:1950:25)
[2025-11-03 11:08:04.091647] [STDOUT] stdout: [        ]   #2      VmService._call (package:vm_service/src/vm_service.dart:1962:8)
[2025-11-03 11:08:04.091674] [STDOUT] stdout: [        ]   flutter-tizen#3      VmService.callServiceExtension (package:vm_service/src/vm_service.dart:1901:14)
[2025-11-03 11:08:04.091693] [STDOUT] stdout: [        ]   flutter-tizen#4      VMServiceFlutterDriver.sendCommand (package:flutter_driver/src/driver/vmservice_driver.dart:327:12)
[2025-11-03 11:08:04.091713] [STDOUT] stdout: [        ]   flutter-tizen#5      FlutterDriver.requestData (package:flutter_driver/src/driver/driver.dart:573:13)
[2025-11-03 11:08:04.091733] [STDOUT] stdout: [        ]   flutter-tizen#6      main.<anonymous closure> (file:///opt/s/w/ir/x/w/rc/tmpv6pcbna2/flutter%20sdk/dev/integration_tests/android_verified_input/test_driver/main_test.dart:28:57)
[2025-11-03 11:08:04.091750] [STDOUT] stdout: [        ]   <asynchronous suspension>
[2025-11-03 11:08:04.091767] [STDOUT] stdout: [        ]   flutter-tizen#7      Declarer.test.<anonymous closure>.<anonymous closure> (package:test_api/src/backend/declarer.dart:242:9)
[2025-11-03 11:08:04.091784] [STDOUT] stdout: [        ]   <asynchronous suspension>
[2025-11-03 11:08:04.092408] [STDOUT] stdout: [        ]   flutter-tizen#8      Declarer.test.<anonymous closure> (package:test_api/src/backend/declarer.dart:240:7)
[2025-11-03 11:08:04.092472] [STDOUT] stdout: [        ]   <asynchronous suspension>
[2025-11-03 11:08:04.092502] [STDOUT] stdout: [        ]   flutter-tizen#9      Invoker._waitForOutstandingCallbacks.<anonymous closure> (package:test_api/src/backend/invoker.dart:282:9)
```

Try copying this configuration used by other tests as a speculative fix.
I can't get this test to kick off in presubmit, so I suppose we will
just try this. The test is marked bringup anyways so it won't block the
tree if this doesn't help.

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md

---------

Co-authored-by: Gray Mackall <mackall@google.com>
xiaowei-guan pushed a commit to xiaowei-guan/flutter that referenced this pull request Jan 22, 2026
Fixes flutter#181196

This PR fixes the description for the bySemanticsLabel/Identifier
matchers, which was missing.

Note: The framework uses `byElementPredicate()` in a bunch of places in
tests, but not all use the `description` field.
Should we add descriptions to those?

Example:

```dart
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';

void main() {
  testWidgets('bySemanticsLabel', (tester) async {
    await tester.pumpWidget(const MaterialApp(home: Text('hello')));
    await tester.pumpAndSettle();
    expect(find.bySemanticsLabel('goodbye'), findsOneWidget);
  });

  testWidgets('bySemanticsLabel regex', (tester) async {
    await tester.pumpWidget(const MaterialApp(home: Text('hello')));
    await tester.pumpAndSettle();
    expect(find.bySemanticsLabel(RegExp('^foo')), findsOneWidget);
  });

  testWidgets('bySemanticsIdentifier', (tester) async {
    await tester.pumpWidget(const MaterialApp(home: Text('hello')));
    await tester.pumpAndSettle();
    expect(find.bySemanticsIdentifier('goodbye'), findsOneWidget);
  });

  testWidgets('bySemanticsIdentifier regex', (tester) async {
    await tester.pumpWidget(const MaterialApp(home: Text('hello')));
    await tester.pumpAndSettle();
    expect(find.bySemanticsIdentifier(RegExp('^foo')), findsOneWidget);
  });
}
```

now gives:

```dart
══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════
The following TestFailure was thrown running a test:
Expected: exactly one matching candidate
  Actual: _ElementPredicateWidgetFinder:<Found 0 widgets with a semantics label named "goodbye": []>
   Which: means none were found but one was expected

When the exception was thrown, this was the stack:
flutter-tizen#4      main.<anonymous closure> (file:///Users/navaronbracke/Desktop/matchers_test/test/widget_test.dart:8:5)
<asynchronous suspension>
flutter-tizen#5      testWidgets.<anonymous closure>.<anonymous closure> (package:flutter_test/src/widget_tester.dart:192:15)
<asynchronous suspension>
flutter-tizen#6      TestWidgetsFlutterBinding._runTestBody (package:flutter_test/src/binding.dart:1692:5)
<asynchronous suspension>
<asynchronous suspension>
(elided one frame from package:stack_trace)

This was caught by the test expectation on the following line:
  file:///Users/navaronbracke/Desktop/matchers_test/test/widget_test.dart line 8
The test description was:
  bySemanticsLabel
════════════════════════════════════════════════════════════════════════════════════════════════════
══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════
The following TestFailure was thrown running a test:
Expected: exactly one matching candidate
  Actual: _ElementPredicateWidgetFinder:<Found 0 widgets with a semantics label matching the pattern
"^foo": []>
   Which: means none were found but one was expected

When the exception was thrown, this was the stack:
flutter-tizen#4      main.<anonymous closure> (file:///Users/navaronbracke/Desktop/matchers_test/test/widget_test.dart:14:5)
<asynchronous suspension>
flutter-tizen#5      testWidgets.<anonymous closure>.<anonymous closure> (package:flutter_test/src/widget_tester.dart:192:15)
<asynchronous suspension>
flutter-tizen#6      TestWidgetsFlutterBinding._runTestBody (package:flutter_test/src/binding.dart:1692:5)
<asynchronous suspension>
<asynchronous suspension>
(elided one frame from package:stack_trace)

This was caught by the test expectation on the following line:
  file:///Users/navaronbracke/Desktop/matchers_test/test/widget_test.dart line 14
The test description was:
  bySemanticsLabel regex
════════════════════════════════════════════════════════════════════════════════════════════════════
══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════
The following TestFailure was thrown running a test:
Expected: exactly one matching candidate
  Actual: _ElementPredicateWidgetFinder:<Found 0 widgets with a semantics identifier named
"goodbye": []>
   Which: means none were found but one was expected

When the exception was thrown, this was the stack:
flutter-tizen#4      main.<anonymous closure> (file:///Users/navaronbracke/Desktop/matchers_test/test/widget_test.dart:20:5)
<asynchronous suspension>
flutter-tizen#5      testWidgets.<anonymous closure>.<anonymous closure> (package:flutter_test/src/widget_tester.dart:192:15)
<asynchronous suspension>
flutter-tizen#6      TestWidgetsFlutterBinding._runTestBody (package:flutter_test/src/binding.dart:1692:5)
<asynchronous suspension>
<asynchronous suspension>
(elided one frame from package:stack_trace)

This was caught by the test expectation on the following line:
  file:///Users/navaronbracke/Desktop/matchers_test/test/widget_test.dart line 20
The test description was:
  bySemanticsIdentifier
════════════════════════════════════════════════════════════════════════════════════════════════════
══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════
The following TestFailure was thrown running a test:
Expected: exactly one matching candidate
  Actual: _ElementPredicateWidgetFinder:<Found 0 widgets with a semantics identifier matching the
pattern "^foo": []>
   Which: means none were found but one was expected

When the exception was thrown, this was the stack:
flutter-tizen#4      main.<anonymous closure> (file:///Users/navaronbracke/Desktop/matchers_test/test/widget_test.dart:26:5)
<asynchronous suspension>
flutter-tizen#5      testWidgets.<anonymous closure>.<anonymous closure> (package:flutter_test/src/widget_tester.dart:192:15)
<asynchronous suspension>
flutter-tizen#6      TestWidgetsFlutterBinding._runTestBody (package:flutter_test/src/binding.dart:1692:5)
<asynchronous suspension>
<asynchronous suspension>
(elided one frame from package:stack_trace)

This was caught by the test expectation on the following line:
  file:///Users/navaronbracke/Desktop/matchers_test/test/widget_test.dart line 26
The test description was:
  bySemanticsIdentifier regex
════════════════════════════════════════════════════════════════════════════════════════════════════

```

*If you had to change anything in the [flutter/tests] repo, include a
link to the migration guide as per the [breaking change policy].*

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [ ] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
xiaowei-guan pushed a commit to xiaowei-guan/flutter that referenced this pull request Jan 29, 2026
Instead of using fake touch events. 

Before this patch `FlutterViewController` sends two fake touch events
(down and up), at `(0, 0)` to the framework to signal that the status
bar is tapped on iOS. The scaffold widget and the cupertino page
scaffold widget set up gesture detectors to listen for these fake taps,
and scroll the "primary" scrollable container to the top in response.

This messaging mechanism is sometimes ambiguous, as the framework may
interpret that as a pair of regular pointer tap events (for instance in
flutter#177992 the modal barrier claims the tap gesture and as a result the
modal barrier is dismissed by the fake touch events). This PR changes
that to communicate the status bar tap event via a new system channel,
and dispatch the events via `WidgetsBindingObserver`s in the framework.

See also
flutter#177992 (comment)

Fixes flutter#177992, fixes flutter#175606

It appears that UIKit also has access to the coordinates of the touch
events to determine which scrollable view(s?) to dispatch the scroll to
top event to.
```objc
  * frame #0: 0x00000001032f6520 UIPlayground.debug.dylib`MyScrollViewController.scrollViewShouldScrollToTop(scrollView=0x0000000106014800) at UIScrollView.swift:13:3
    frame #2: 0x00000001867c9300 UIKitCore`-[UIScrollView _scrollToTopIfPossible:] + 316
    frame flutter-tizen#3: 0x00000001867c9604 UIKitCore`-[UIScrollView _scrollToTopFromTouchAtScreenLocation:resultHandler:] + 40
    frame flutter-tizen#4: 0x0000000186299bbc UIKitCore`__71-[UIWindow _scrollToTopViewsUnderScreenPointIfNecessary:resultHandler:]_block_invoke.358 + 168
    frame flutter-tizen#5: 0x000000018629981c UIKitCore`-[UIWindow _scrollToTopViewsUnderScreenPointIfNecessary:resultHandler:] + 1212
    frame flutter-tizen#6: 0x000000018581ed8c UIKitCore`-[UIStatusBarManager _handleScrollToTopAtXPosition:] + 192
    frame flutter-tizen#7: 0x000000018581eb60 UIKitCore`-[UIStatusBarManager handleTapAction:] + 60
```
Unfortunately that information is not available to user application. The
iOS accessibility bridge currently does create dummy UIScrollViews for
each scrollable in the accessibility tree so may be we can take
advantage of that in the future.

## Pre-launch Checklist

- [ ] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [ ] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [ ] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [ ] I signed the [CLA].
- [ ] I listed at least one issue that this PR fixes in the description
above.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [ ] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [ ] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [ ] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
xiaowei-guan pushed a commit to xiaowei-guan/flutter that referenced this pull request May 25, 2026
This patch:
1. Updates the `-mios-simulator-version-min` ldflag to `15.0` (this
fixes the crash during test discovery).
2. refactors swiftc.py a bit, moves the target triplet logic from
darwin/BUILD.gn to swiftc.py so you can override the ios version in a
test target (but it's not absolutely necessary for this change since
it's the linker flag that makes the difference).
3. Migrates a few xctest tests to swift testing tests. The names of the
tests are kept as-is so the diff is easier to read.


### The Crash 
```
(lldb) bt
* thread flutter-tizen#9, name = '[Swift Testing] test discovery - loading test #0 (Task 3)', queue = 'com.apple.root.user-initiated-qos.cooperative', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
  * frame #0: 0x0000000000000000 
    frame #1: 0x000000010ad0fb80 libios_test_flutter.dylib`closure #1() in variable initialization expression of static AccessibilityFeaturesTests.$s22ios_test_flutter_swift26AccessibilityFeaturesTestsV43accessibilityFeatureFlagRawValuesAreCorrect4TestfMp_24accessorc8120add5c86a9e3fMu_ at @__swiftmacro_22ios_test_flutter_swift26AccessibilityFeaturesTestsV43accessibilityFeatureFlagRawValuesAreCorrect4TestfMp_.swift:0
    frame #2: 0x000000010224a39c Testing`partial apply for closure #1 in __checkClosureCall(performing:throws:mismatchExplanation:expression:comments:isRequired:sourceLocation:)
    frame flutter-tizen#3: 0x000000010224a39c Testing`partial apply for closure #1 in __checkClosureCall(performing:throws:mismatchExplanation:expression:comments:isRequired:sourceLocation:)
    frame flutter-tizen#4: 0x00000001022d8de8 Testing`(1) await resume partial function for generic specialization <(Testing.Test, Testing.Runner.Plan.Action)> of reabstraction thunk helper <τ_0_0 where τ_0_0: Swift.Sendable> from @escaping @isolated(any) @callee_guaranteed @async () -> (@out τ_0_0) to @escaping @callee_guaranteed @async () -> (@out τ_0_0, @error @owned Swift.Error)
    frame flutter-tizen#5: 0x000000010224ae24 Testing`closure #1 in __checkClosureCall(throws:performing:expression:comments:isRequired:sourceLocation:)
```

Initially I thought swift testing doesn't support test discovery in
linked dylibs but it's apparently not the case. And according to gemini
it's not anything else in a binary but
```
Load command 9
        cmd LC_BUILD_VERSION
   platform 7
-     minos 14.0
+     minos 15.6
        sdk 26.4
```

As it tried to use `15.6` in `swift_flags` and put `14.0` in `ldflags`
and hit the same crash.

This is what gemini has to say:
> This is the definitive end of the road! 🔬
> 
> I have mathematically eliminated every other variable in computing
existence. Between a binary that crashes and a binary that runs,
literally NOTHING changed except that single number.


Also it thinks it's because of this in `dyld`:
> Look at the code in dyldMain.cpp at Line 430:
> 
> cpp
> // dyldMain.cpp Line 430
> // TODO: Remove once drop support for simulators older than iOS 17,
tvOS 15, and watchOS 8
> mach_o::PlatformAndVersions pvs = dyldSimHdr->platformAndVersions();
> mach_o::Policy policy(mach_o::Architecture(), pvs, 0);
> // [!!] THE SMOKING GUN [!!]
> // Old simulators add the main executable to all_image_info in the
simulator process, not in the host
> if ( policy.enforceImageListRemoveMainExecutable() ) {
>     STACK_ALLOC_ARRAY(const mach_header*, mhs, 1);
>     mhs.push_back(state.config.process.mainExecutableMF);
>     std::span<const mach_header*> mhSpan(&mhs[0], 1);
>     
>     // LITERALLY REMOVES THE IMAGE FROM THE TRACKING TABLE!!
> state.externallyViewable->removeImages(state.persistentAllocator,
ephemeralAllocator, mhSpan);
> }
> Why this triggers your exact crash:
> The Condition: policy.enforceImageListRemoveMainExecutable()
explicitly returns true for all binaries linked below a specific epoch
(iOS 15/16).
> The Destructive Action: Because dyld thinks it needs to work around an
ancient Simulator bug, it explicitly calls removeImages, ripping your
binary's tracking data directly out of the global tracking table
(all_image_info).
> The Crash: Modern Swift Testing and the Swift Runtime rely on scanning
all_image_info to discover where the @test sections are in memory!
> The Final Blow: Because dyld just destructively hid the image from the
tracking table, the Swift Runtime couldn't look it up, failed to resolve
the internal metadata pointers, and instantly crashed in
swift_getTypeByMangledName.
> By simply lying and writing minos 15.0 into the header, you caused
policy.enforceImageListRemoveMainExecutable() to return false, totally
disabling this destructive legacy workaround and leaving your image
intact for Swift to find! 🔬🏆🏁

## Pre-launch Checklist

- [ ] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [ ] I read the [AI contribution guidelines] and understand my
responsibilities, or I am not using AI tools.
- [ ] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [ ] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [ ] I signed the [CLA].
- [ ] I listed at least one issue that this PR fixes in the description
above.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [ ] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [ ] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [ ] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

If this change needs to override an active code freeze, provide a
comment explaining why. The code freeze workflow can be overridden by
code reviewers. See pinned issues for any active code freezes with
guidance.

**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[AI contribution guidelines]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#ai-contribution-guidelines
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
xiaowei-guan pushed a commit to xiaowei-guan/flutter that referenced this pull request May 25, 2026
…rent (e.g. Table) (flutter#185793)

## Issue

Fixes flutter#174133 (and the duplicate flutter#180337). Placing a widget that hosts
an `OverlayPortal` — most visibly `Slider`, but anything that calls
`OverlayPortalController.show()` before its `OverlayPortal` is mounted —
inside a `Table`/`TableRow` crashes during mount with:

```
'package:flutter/src/rendering/object.dart':
Failed assertion: line 2138 pos 12: 'child.owner == owner': is not true.

#2  RenderObject.redepthChild
flutter-tizen#3  _RenderDeferredLayoutBox.redepthChildren           overlay.dart:2576
flutter-tizen#4  RenderObject.redepthChild
flutter-tizen#5  RenderObject.adoptChild
flutter-tizen#6  _RenderTheater._addDeferredChild                   overlay.dart:1312
flutter-tizen#7  _OverlayEntryLocation._addChild                    overlay.dart:2185
flutter-tizen#8  _OverlayPortalElement.insertRenderObjectChild      overlay.dart:2447
...
flutter-tizen#24 _TableElement.mount.<anonymous closure>...        table.dart:303
```

This is a regression introduced between Flutter 3.32 and 3.35.

## Root cause

`Table` defers calling `adoptChild` on its `RenderObject` children until
*every* row has been mounted (`_TableElement.insertRenderObjectChild` is
a no-op while `_doingMountOrUpdate`; the children are wired in later by
`_updateRenderObjectChildren`). Meanwhile `_OverlayPortalElement.mount`
runs `super.mount` (which "attaches" the layout surrogate to its parent
— but Table swallows it) and then immediately mounts the overlay child,
which causes the deferred-layout box to be adopted by the
`_RenderTheater`. The theater is attached, so the deferred box receives
an owner — *while the layout surrogate has none yet*.

When the theater calls `redepthChild(deferredBox)`, the deferred box's
`redepthChildren` unconditionally calls
`_layoutSurrogate.redepthChild(this)`, which trips the `child.owner ==
owner` assertion across that owner boundary.

## Fix

`_RenderDeferredLayoutBox.redepthChildren` now skips the cross-redepth
when the surrogate is not yet attached, mirroring the existing guard in
`_RenderLayoutSurrogateProxyBox.redepthChildren`:

```dart
if (_layoutSurrogate.attached) {
  _layoutSurrogate.redepthChild(this);
}
```

The depth invariant is restored when the surrogate is finally adopted by
its parent: `_RenderLayoutSurrogateProxyBox.redepthChildren` already
calls `redepthChild(_deferredLayoutChild)` once that child becomes
attached.

## Tests

Adds a regression test in `test/widgets/table_test.dart` placing an
`OverlayPortal` whose controller is `.show()`'d before mount (mirroring
`Slider`) inside a `TableRow`, asserting that no exception is thrown and
the overlay child is present.

Without this fix the new test reproduces the assertion. With this fix
`flutter test test/widgets/table_test.dart`,
`test/widgets/overlay_portal_test.dart`,
`test/widgets/overlay_test.dart`, `test/widgets/raw_tooltip_test.dart`,
`test/widgets/overlay_layout_builder_test.dart`, and
`test/material/slider_test.dart` all pass.

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I added new tests to check the change I am making.
- [x] All existing and new tests are passing.

[Contributor Guide]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo

---------

Co-authored-by: Victor Sanni <victorsanniay@gmail.com>
xiaowei-guan pushed a commit to xiaowei-guan/flutter that referenced this pull request Jun 5, 2026
Fixes flutter#184725

This PR makes the tool exit when building with XCode and we didn't parse
any build setting. I understand that there are no cases where this map
can be empty, as it includes the app bundle ID, which is required when
building.

If we don't exit, it can show unrelated error messages to the users
which could be confusing and hard to debug.
For instance, from the linked issue, one could end up getting: `No valid
code signing certificates were found` simply because the development
team build setting was not available, despite having valid certificates
installed.

Sample output:
```
[  +63 ms] executing: [/Users/admin/builds/AEFj1IwjB/0/repo/ios/Runner.xcodeproj/] /usr/bin/arch -arm64e xcrun xcodebuild -project /Users/admin/builds/AEFj1IwjB/0/repo/ios/Runner.xcodeproj -scheme Runner -configuration Release -destination generic/platform=iOS -showBuildSettings BUILD_DIR=/Users/admin/builds/AEFj1IwjB/0/repo/build/ios
[        ] executing: [/Users/admin/builds/AEFj1IwjB/0/repo/ios/Runner.xcodeproj/] /usr/bin/arch -arm64e xcrun xcodebuild -project /Users/admin/builds/AEFj1IwjB/0/repo/ios/Runner.xcodeproj -scheme Runner -configuration Release -destination generic/platform=iOS -showBuildSettings BUILD_DIR=/Users/admin/builds/AEFj1IwjB/0/repo/build/ios
[ +765 ms] Command line invocation:
               /Applications/Xcode-26.3.0.app/Contents/Developer/usr/bin/xcodebuild -project /Users/admin/builds/AEFj1IwjB/0/repo/ios/Runner.xcodeproj -scheme Runner -configuration Release -destination generic/platform=iOS -showBuildSettings BUILD_DIR=/Users/admin/builds/AEFj1IwjB/0/repo/build/ios
           Build settings from command line:
               BUILD_DIR = /Users/admin/builds/AEFj1IwjB/0/repo/build/ios
           2026-04-06 17:36:53.692 xcodebuild[9020:45597] Writing error result bundle to /var/folders/4p/084k9rr96ld_w60n8rdr0wtm0000gn/T/ResultBundle_2026-06-04_17-36-0053.xcresult
           xcodebuild: error: Could not configure request to show build settings: Unable to find a destination matching the provided destination specifier:
           		{ generic:1, platform:iOS }
           	Ineligible destinations for the "Runner" scheme:
           		{ platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device, error:iOS 26.2 is not installed. Please download and install the platform from Xcode > Settings > Components. }
[        ] Unexpected failure to get Xcode build settings: ProcessException: Process exited abnormally with exit code 64:
           Command line invocation:
               /Applications/Xcode-26.3.0.app/Contents/Developer/usr/bin/xcodebuild -project /Users/admin/builds/AEFj1IwjB/0/repo/ios/Runner.xcodeproj -scheme Runner -configuration Release -destination generic/platform=iOS -showBuildSettings BUILD_DIR=/Users/admin/builds/AEFj1IwjB/0/repo/build/ios
           Build settings from command line:
               BUILD_DIR = /Users/admin/builds/AEFj1IwjB/0/repo/build/ios
           2026-04-06 17:36:53.692 xcodebuild[9020:45597] Writing error result bundle to /var/folders/4p/084k9rr96ld_w60n8rdr0wtm0000gn/T/ResultBundle_2026-06-04_17-36-0053.xcresult
           xcodebuild: error: Could not configure request to show build settings: Unable to find a destination matching the provided destination specifier:
           		{ generic:1, platform:iOS }
           	Ineligible destinations for the "Runner" scheme:
           		{ platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device, error:iOS 26.2 is not installed. Please download and install the platform from Xcode > Settings > Components. }
             Command: /usr/bin/arch -arm64e xcrun xcodebuild -project /Users/admin/builds/AEFj1IwjB/0/repo/ios/Runner.xcodeproj -scheme Runner -configuration Release -destination generic/platform=iOS -showBuildSettings BUILD_DIR=/Users/admin/builds/AEFj1IwjB/0/repo/build/ios.
[   +2 ms] Archiving example.com.myapp...
[  +25 ms] Migrating AppFrameworkInfo.plist contents
[        ] Upgrading AppFrameworkInfo.plist
[        ] Upgrading Podfile
[   +9 ms] The Swift Package Manager feature is off. Skipping the migration that adds Swift Package Manager integration...
[   +6 ms] executing: xattr -r -d com.apple.FinderInfo /Users/admin/builds/AEFj1IwjB/0/repo
[+1948 ms] Failed to remove xattr com.apple.FinderInfo from /Users/admin/builds/AEFj1IwjB/0/repo
[   +1 ms] executing: [/Users/admin/builds/AEFj1IwjB/0/repo/ios/Runner.xcodeproj/] /usr/bin/arch -arm64e xcrun xcodebuild -project /Users/admin/builds/AEFj1IwjB/0/repo/ios/Runner.xcodeproj -scheme Runner -configuration Release -destination generic/platform=iOS -showBuildSettings BUILD_DIR=/Users/admin/builds/AEFj1IwjB/0/repo/build/ios
[        ] executing: [/Users/admin/builds/AEFj1IwjB/0/repo/ios/Runner.xcodeproj/] /usr/bin/arch -arm64e xcrun xcodebuild -project /Users/admin/builds/AEFj1IwjB/0/repo/ios/Runner.xcodeproj -scheme Runner -configuration Release -destination generic/platform=iOS -showBuildSettings BUILD_DIR=/Users/admin/builds/AEFj1IwjB/0/repo/build/ios
[ +920 ms] Command line invocation:
               /Applications/Xcode-26.3.0.app/Contents/Developer/usr/bin/xcodebuild -project /Users/admin/builds/AEFj1IwjB/0/repo/ios/Runner.xcodeproj -scheme Runner -configuration Release -destination generic/platform=iOS -showBuildSettings BUILD_DIR=/Users/admin/builds/AEFj1IwjB/0/repo/build/ios
           Build settings from command line:
               BUILD_DIR = /Users/admin/builds/AEFj1IwjB/0/repo/build/ios
           2026-04-06 17:36:56.608 xcodebuild[9023:45646] Writing error result bundle to /var/folders/4p/084k9rr96ld_w60n8rdr0wtm0000gn/T/ResultBundle_2026-06-04_17-36-0056.xcresult
           xcodebuild: error: Could not configure request to show build settings: Unable to find a destination matching the provided destination specifier:
           		{ generic:1, platform:iOS }
           	Ineligible destinations for the "Runner" scheme:
           		{ platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device, error:iOS 26.2 is not installed. Please download and install the platform from Xcode > Settings > Components. }
[        ] Unexpected failure to get Xcode build settings: ProcessException: Process exited abnormally with exit code 64:
           Command line invocation:
               /Applications/Xcode-26.3.0.app/Contents/Developer/usr/bin/xcodebuild -project /Users/admin/builds/AEFj1IwjB/0/repo/ios/Runner.xcodeproj -scheme Runner -configuration Release -destination generic/platform=iOS -showBuildSettings BUILD_DIR=/Users/admin/builds/AEFj1IwjB/0/repo/build/ios
           Build settings from command line:
               BUILD_DIR = /Users/admin/builds/AEFj1IwjB/0/repo/build/ios
           2026-04-06 17:36:56.608 xcodebuild[9023:45646] Writing error result bundle to /var/folders/4p/084k9rr96ld_w60n8rdr0wtm0000gn/T/ResultBundle_2026-06-04_17-36-0056.xcresult
           xcodebuild: error: Could not configure request to show build settings: Unable to find a destination matching the provided destination specifier:
           		{ generic:1, platform:iOS }
           	Ineligible destinations for the "Runner" scheme:
           		{ platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device, error:iOS 26.2 is not installed. Please download and install the platform from Xcode > Settings > Components. }
             Command: /usr/bin/arch -arm64e xcrun xcodebuild -project /Users/admin/builds/AEFj1IwjB/0/repo/ios/Runner.xcodeproj -scheme Runner -configuration Release -destination generic/platform=iOS -showBuildSettings BUILD_DIR=/Users/admin/builds/AEFj1IwjB/0/repo/build/ios.
[  +66 ms] executing: which security
[   +4 ms] executing: which openssl
[  +22 ms] executing: security find-identity -p codesigning -v
[  +57 ms]   1) <ID> "Apple Distribution: ACME. (<ID>)"
                1 valid identities found
[   +1 ms] ════════════════════════════════════════════════════════════════════════════════
           No valid code signing certificates were found
           You can connect to your Apple Developer account by signing in with your Apple ID
           in Xcode and create an iOS Development Certificate as well as a Provisioning 
           Profile for your project by:
             1- Open the Flutter project's Xcode target with
                  open ios/Runner.xcworkspace
             2- Select the 'Runner' project in the navigator then the 'Runner' target
                in the project settings
             3- Make sure a 'Development Team' is selected under Signing & Capabilities > Team. 
                You may need to:
                    - Log in with your Apple ID in Xcode first
                    - Ensure you have a valid unique Bundle ID
                    - Register your device with your Apple Developer Account
                    - Let Xcode automatically provision a profile for your app
             4- Build or run your project again
             5- Trust your newly created Development Certificate on your iOS device
                via Settings > General > Device Management > [your new certificate] > Trust
           For more information, please visit:
             https://developer.apple.com/library/content/documentation/IDEs/Conceptual/
             AppDistributionGuide/MaintainingCertificates/MaintainingCertificates.html
           Or run on an iOS simulator without code signing
           ════════════════════════════════════════════════════════════════════════════════
[   +1 ms] "flutter ipa" took 7,479ms.
[   +2 ms] executing: sw_vers -productName
[   +8 ms] Exit code 0 from: sw_vers -productName
[        ] macOS
[        ] executing: sw_vers -productVersion
[   +6 ms] Exit code 0 from: sw_vers -productVersion
[        ] 26.0
[        ] executing: sw_vers -buildVersion
[   +6 ms] Exit code 0 from: sw_vers -buildVersion
[        ] 25A354
[        ] executing: uname -m
[  +10 ms] Exit code 0 from: uname -m
[        ] arm64
[  +20 ms] No development certificates available to code sign app for device deployment
[        ] 
           #0      throwToolExit (package:flutter_tools/src/base/common.dart:34:3)
           #1      XcodeCodeSigningSettings._getCodeSigningBuildSettings (package:flutter_tools/src/ios/code_signing.dart:340:9)
           <asynchronous suspension>
           #2      buildXcodeProject (package:flutter_tools/src/ios/mac.dart:322:26)
           <asynchronous suspension>
           flutter-tizen#3      _BuildIOSSubCommand.runCommand (package:flutter_tools/src/commands/build_ios.dart:986:37)
           <asynchronous suspension>
           flutter-tizen#4      BuildIOSArchiveCommand.runCommand (package:flutter_tools/src/commands/build_ios.dart:477:50)
           <asynchronous suspension>
           flutter-tizen#5      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1590:27)
           <asynchronous suspension>
           flutter-tizen#6      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:154:19)
           <asynchronous suspension>
           flutter-tizen#7      CommandRunner.runCommand (package:args/command_runner.dart:212:13)
           <asynchronous suspension>
           flutter-tizen#8      FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:496:9)
           <asynchronous suspension>
           flutter-tizen#9      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:154:19)
           <asynchronous suspension>
           flutter-tizen#10     FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:431:5)
           <asynchronous suspension>
           flutter-tizen#11     FlutterCommandRunner.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:307:33)
           <asynchronous suspension>
           flutter-tizen#12     run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:104:11)
           <asynchronous suspension>
           flutter-tizen#13     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:154:19)
           <asynchronous suspension>
           flutter-tizen#14     main (package:flutter_tools/executable.dart:103:3)
           <asynchronous suspension>
[        ] Running 2 shutdown hooks
[        ] Shutdown hooks complete
[  +56 ms] exiting with code 1
```

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [AI contribution guidelines] and understand my
responsibilities, or I am not using AI tools.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[AI contribution guidelines]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#ai-contribution-guidelines
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md

---------

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: Elijah Okoroh <okorohelijah@google.com>
xiaowei-guan pushed a commit to xiaowei-guan/flutter that referenced this pull request Jun 18, 2026
…87721)

https://skia.googlesource.com/skia.git/+log/43f135735152..aeed11c35004

2026-06-09 skia-autoroll@skia-public.iam.gserviceaccount.com Roll
SwiftShader from d26a3e6606c0 to 5b0479bd2d15 (1 revision)
2026-06-09 skia-autoroll@skia-public.iam.gserviceaccount.com Roll
jsfiddle-base from 9e1524dc815b to d568314f3014
2026-06-09 skia-autoroll@skia-public.iam.gserviceaccount.com Roll
debugger-app-base from 8e5327247e09 to d2178d1c149d
2026-06-09 skia-autoroll@skia-public.iam.gserviceaccount.com Roll
vulkan-deps from 537ea5cb1a35 to 2f96412cd516 (9 revisions)
2026-06-08 alexisdavidc@google.com Created an RAII Wrapper for
SkCanvas->fScratchGlyphRunBuilder
2026-06-08 michaelludwig@google.com [ganesh] Fix
AsyncReadPixelsContextShutdown expectation on protected contexts
2026-06-08 kjlubick@google.com Avoid improper mask formats for SDFT runs
2026-06-08 arthursonzogni@chromium.org Reland flutter-tizen#4 "MiraclePtr: Add
raw_ptr definitions"
2026-06-08 robertphillips@google.com Reland "Add public API to query a
serialized key for external format usage"
2026-06-08 michaelludwig@google.com Add GM to test new Graphite rrect
clip support
2026-06-08 michaelludwig@google.com [ganesh] Track async task execution
for callbacks

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/skia-flutter-autoroll
Please CC bensonluk@google.com,kjlubick@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry
To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
xiaowei-guan pushed a commit to xiaowei-guan/flutter that referenced this pull request Sep 2, 2026
…with initWith on public DSL (flutter#191606)

This is PR 4 of 11 in the AGP 9.1.0 / public `gradle-api` / newdsl
migration stack.

There are no breaking changes expected in this pr. Only internal logic
is impacted.

I will be honest I also found the tests hard to review. I had the agent
pull out shared mocking logic but I am not sure that actually made
review easier.

Depends on flutter#191218 (PR 3).
- @reidbaker

---
Standard review context for this pr stack

This is PR is part of an 11 pr stack to migrate the "newdsl"
`gradle-api` specifically in agp 9.1.0.

All of the code was LLM authored. A mix of manual prompting, automatic
prompting, several models and adversarial review. The combined sessions
are enough that I cannot include relevant prompts like I have been doing
on other prs.

If you want to review the pr stack you can find it here. These prs will
be abandoned/closed as prs land into flutter/flutter.
1. reidbaker-agent#1 (branch:
agp-api-doc)
2. reidbaker-agent#2 (branch:
agp-internal-utils)
3. reidbaker-agent#3 (branch:
agp-buildmode-deps)
4. reidbaker-agent#4 (branch:
agp-plugin-buildtypes)
5. reidbaker-agent#5 (branch:
agp-ndk-fallback)
6. reidbaker-agent#6 (branch:
agp-assets-onvariants)
7. reidbaker-agent#7 (branch:
agp-apk-copy-versioncode)
8. reidbaker-agent#8 (branch:
agp-add-to-app)
9. reidbaker-agent#9 (branch:
agp-aar-script)
10. reidbaker-agent#10 (branch:
agp-newdsl-flip)
11. reidbaker-agent#11 (branch:
agp-gradle-api)

This work is urgent in the sense that we are worried that android will
publish agp 10 with no opt out but not so urgent that we are willing to
break flutter users because we didn't review or understand the code
because we were in a rush.

Breaking changes are expected as part of this work. There are patterns
the android team explicitly does not want apps to use and apis that have
no equivalent.

As part of the effort to ensure this work does not slip into ai slop,
prs from this stack will be reviewed by me (@reidbaker) before asking
for review. Then we will have 2 android expert reviewers also review
every pr.

---
Agent authored description.
This is PR 4 of 11 in the AGP 9.1.0 / public `gradle-api` migration
stack (flutter#180137, flutter#166550).

### Key Changes
- **Public DSL `initWith` Copy**: Replaces the legacy
`getLegacyAndroidExtension` build-type copy in `PluginHandler` with
`initWith` on the public DSL (`AgpCommonExtensionWrapper.buildTypes`).
Missing build types on the plugin project are created with
`initWith(appBuildType)`, and `isDebuggable` is copied when both sides
are `ApplicationBuildType`.
- **Zero AGP Internals in Production Sources**: Removes the last
remaining `com.android.build.gradle.internal` imports from production
code (`src/main`).
- **Internal AGP Import Guard**: Adds `InternalAgpApiImportTest` to
continuously enforce that production sources do not introduce
`com.android.build.gradle.internal.*` imports.
- **Decomposed & Robust Unit Tests**: Replaces legacy mock-only tests in
`PluginHandlerTest` with tests that execute `configurePlugins` and
verify `initWith` copying for both library and application plugin
projects, mapping custom debuggable build types to debug engine
artifacts, and verifying that pre-existing plugin build types are
skipped.
- **Migration Documentation Update**: Adds details for the P3 pre-spike
and `finalizeDsl` fallback in
`Migrating-Flutter-Gradle-Plugin-to-AGP-public-API.md`.

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [AI contribution guidelines] and understand my
responsibilities, or I am not using AI tools.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants