Skip to content

Bump github/codeql-action from 2.1.10 to 2.1.15 - #8

Closed
dependabot[bot] wants to merge 1 commit into
masterfrom
dependabot/github_actions/github/codeql-action-2.1.15
Closed

dependabot[bot] wants to merge 1 commit into
masterfrom
dependabot/github_actions/github/codeql-action-2.1.15

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Jun 29, 2022

Copy link
Copy Markdown

Bumps github/codeql-action from 2.1.10 to 2.1.15.

Changelog

Sourced from github/codeql-action's changelog.

CodeQL Action Changelog

[UNRELEASED]

No user facing changes.

2.1.15 - 28 Jun 2022

  • CodeQL query packs listed in the packs configuration field will be skipped if their target language is not being analyzed in the current Actions job. Previously, this would throw an error. #1116
  • The combination of python2 and poetry is no longer supported. See actions/setup-python#374 for more details. #1124
  • Update default CodeQL bundle version to 2.10.0. #1123

2.1.14 - 22 Jun 2022

No user facing changes.

2.1.13 - 21 Jun 2022

  • Update default CodeQL bundle version to 2.9.4. #1100

2.1.12 - 01 Jun 2022

  • Update default CodeQL bundle version to 2.9.3. #1084

2.1.11 - 17 May 2022

  • Update default CodeQL bundle version to 2.9.2. #1074

2.1.10 - 10 May 2022

  • Update default CodeQL bundle version to 2.9.1. #1056
  • When wait-for-processing is enabled, the workflow will now fail if there were any errors that occurred during processing of the analysis results.

2.1.9 - 27 Apr 2022

  • Add working-directory input to the autobuild action. #1024
  • The analyze and upload-sarif actions will now wait up to 2 minutes for processing to complete after they have uploaded the results so they can report any processing errors that occurred. This behavior can be disabled by setting the wait-for-processing action input to "false". #1007
  • Update default CodeQL bundle version to 2.9.0.
  • Fix a bug where status reporting fails on Windows. #1042

2.1.8 - 08 Apr 2022

  • Update default CodeQL bundle version to 2.8.5. #1014
  • Fix error where the init action would fail due to a GitHub API request that was taking too long to complete #1025

2.1.7 - 05 Apr 2022

  • A bug where additional queries specified in the workflow file would sometimes not be respected has been fixed. #1018

2.1.6 - 30 Mar 2022

... (truncated)

Commits
  • 3f62b75 Merge pull request #1129 from github/update-v2.1.15-e8c48cc8
  • 26a6980 Update changelog for v2.1.15
  • e8c48cc Merge pull request #1128 from github/criemen/lua-tracer-ff-2
  • 1616e0e Simplify tests for the Lua tracer FF in analyze-action.
  • b40cd03 Merge pull request #1120 from github/criemen/lua-tracer-ff-2
  • 821fe9b Merge branch 'main' into criemen/lua-tracer-ff-2
  • 37d8b51 Merge pull request #1123 from github/cklin/codeql-cli-2.10.0
  • ab7316e Implement unit tests for reading the Lua tracer FF in analyze-action.
  • f422a50 Honor the Lua tracer FF for database trace-command invocations for scanned ...
  • ed40e30 Update default CodeQL version to 2.10.0
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

@dependabot @github

dependabot Bot commented on behalf of github Jun 29, 2022

Copy link
Copy Markdown
Author

Dependabot tried to add @hixie and @godofredoc as reviewers to this PR, but received the following error from GitHub:

POST https://api.github.com/repos/DanTup/flutter/pulls/8/requested_reviewers: 422 - Reviews may only be requested from collaborators. One or more of the users or teams you specified is not a collaborator of the DanTup/flutter repository. // See: https://docs.github.com/rest/reference/pulls#request-reviewers-for-a-pull-request

@dependabot @github

dependabot Bot commented on behalf of github Jun 29, 2022

Copy link
Copy Markdown
Author

The following labels could not be found: team, team: infra, waiting for tree to go green.

@dependabot @github

dependabot Bot commented on behalf of github Jul 13, 2022

Copy link
Copy Markdown
Author

Superseded by #9.

@dependabot dependabot Bot closed this Jul 13, 2022
@dependabot
dependabot Bot deleted the dependabot/github_actions/github/codeql-action-2.1.15 branch July 13, 2022 18:38
DanTup pushed a commit that referenced this pull request Jun 8, 2023
…extMenuBuilder (flutter#128114)

Close flutter#128113 

Fun fact: This is caught by monkey testing I have written (will soon be open sourced as well) that runs on my app!

Without the fix, the test fails as expected:

<details>

```
(base) �  flutter git:(feat/text-field-npe) /Volumes/MyExternal/ExternalRefCode/flutter/bin/flutter test test/material/text_field_test.dart --name 'changes from default'
00:06 +0: context menu contextMenuBuilder changes from default to null                                                                
��� EXCEPTION CAUGHT BY WIDGETS LIBRARY ������������������������������������������������������������
The following _TypeError was thrown building
_OverlayEntryWidget-[LabeledGlobalKey<_OverlayEntryWidgetState>#e3717](state:
_OverlayEntryWidgetState#7666a):
Null check operator used on a null value

When the exception was thrown, this was the stack:
#0      EditableTextState._createSelectionOverlay.<anonymous closure> (package:flutter/src/widgets/editable_text.dart:3331:43)
#1      SelectionOverlay.showToolbar.<anonymous closure> (package:flutter/src/widgets/text_selection.dart:1357:36)
#2      ContextMenuController.show.<anonymous closure> (package:flutter/src/widgets/context_menu_controller.dart:65:54)
#3      _OverlayEntryWidgetState.build (package:flutter/src/widgets/overlay.dart:351:36)
#4      StatefulElement.build (package:flutter/src/widgets/framework.dart:5198:27)
#5      ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5086:15)
#6      StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
#7      Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#8      StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
#9      Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#10     RenderObjectElement.updateChildren (package:flutter/src/widgets/framework.dart:6093:32)
#11     MultiChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6595:17)
#12     Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#13     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
#14     StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
#15     Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#16     StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
#17     Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#18     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
#19     Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#20     ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
#21     Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#22     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
#23     Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#24     ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
#25     _InheritedNotifierElement.update (package:flutter/src/widgets/inherited_notifier.dart:107:11)
#26     Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#27     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
#28     StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
#29     Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#30     StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
#31     Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#32     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
#33     Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#34     ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
#35     _InheritedNotifierElement.update (package:flutter/src/widgets/inherited_notifier.dart:107:11)
#36     Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#37     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
#38     StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
#39     Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#40     StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
#41     Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#42     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
#43     StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
#44     Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#45     StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
#46     Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#47     SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6442:14)
#48     Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#49     SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6442:14)
#50     Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#51     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
#52     Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#53     ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
#54     Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#55     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
#56     StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
#57     Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#58     StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
#59     Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#60     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
#61     Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#62     ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
#63     _InheritedNotifierElement.update (package:flutter/src/widgets/inherited_notifier.dart:107:11)
#64     Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#65     SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6442:14)
#66     Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#67     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
#68     StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
#69     Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#70     StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
#71     Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#72     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
#73     Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#74     ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
#75     Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#76     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
#77     Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#78     ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
#79     Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
flutter#80     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
flutter#81     Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
flutter#82     ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
flutter#83     Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
flutter#84     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
flutter#85     Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
flutter#86     ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
flutter#87     Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
flutter#88     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
flutter#89     Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
flutter#90     StatelessElement.update (package:flutter/src/widgets/framework.dart:5162:5)
flutter#91     Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
flutter#92     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
flutter#93     Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
flutter#94     ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
flutter#95     Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
flutter#96     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
flutter#97     Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
flutter#98     StatelessElement.update (package:flutter/src/widgets/framework.dart:5162:5)
flutter#99     Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
flutter#100    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
flutter#101    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
flutter#102    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
flutter#103    StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
flutter#104    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
flutter#105    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
flutter#106    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
flutter#107    ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
flutter#108    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
flutter#109    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
flutter#110    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
flutter#111    ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
flutter#112    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
flutter#113    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
flutter#114    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
flutter#115    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
flutter#116    StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
flutter#117    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
flutter#118    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
flutter#119    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
flutter#120    StatelessElement.update (package:flutter/src/widgets/framework.dart:5162:5)
flutter#121    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
flutter#122    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
flutter#123    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
flutter#124    ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
flutter#125    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
flutter#126    SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6442:14)
flutter#127    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
flutter#128    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
flutter#129    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
flutter#130    StatelessElement.update (package:flutter/src/widgets/framework.dart:5162:5)
flutter#131    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
flutter#132    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
flutter#133    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
flutter#134    StatelessElement.update (package:flutter/src/widgets/framework.dart:5162:5)
flutter#135    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
flutter#136    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
flutter#137    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
flutter#138    StatelessElement.update (package:flutter/src/widgets/framework.dart:5162:5)
flutter#139    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
flutter#140    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
flutter#141    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
flutter#142    ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
flutter#143    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
flutter#144    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
flutter#145    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
flutter#146    ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
flutter#147    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
flutter#148    SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6442:14)
flutter#149    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
flutter#150    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
flutter#151    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
flutter#152    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
flutter#153    StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
flutter#154    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
flutter#155    SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6442:14)
flutter#156    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
flutter#157    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
flutter#158    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
flutter#159    ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
flutter#160    _InheritedNotifierElement.update (package:flutter/src/widgets/inherited_notifier.dart:107:11)
flutter#161    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
flutter#162    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
flutter#163    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
flutter#164    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
flutter#165    StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
flutter#166    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
flutter#167    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
flutter#168    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
flutter#169    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
flutter#170    StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
flutter#171    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
flutter#172    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
flutter#173    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
flutter#174    ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
flutter#175    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
flutter#176    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
flutter#177    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
flutter#178    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
flutter#179    StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
flutter#180    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
flutter#181    SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6442:14)
flutter#182    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
flutter#183    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
flutter#184    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
flutter#185    ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
flutter#186    _InheritedNotifierElement.update (package:flutter/src/widgets/inherited_notifier.dart:107:11)
flutter#187    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
flutter#188    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
flutter#189    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
flutter#190    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
flutter#191    StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
flutter#192    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
flutter#193    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
flutter#194    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
flutter#195    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
flutter#196    StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
flutter#197    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
flutter#198    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
flutter#199    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
flutter#200    ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
flutter#201    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
flutter#202    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
flutter#203    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
flutter#204    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
flutter#205    StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
flutter#206    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
flutter#207    SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6442:14)
flutter#208    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
flutter#209    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
flutter#210    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
flutter#211    ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
flutter#212    _InheritedNotifierElement.update (package:flutter/src/widgets/inherited_notifier.dart:107:11)
flutter#213    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
flutter#214    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
flutter#215    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
flutter#216    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
flutter#217    StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
flutter#218    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
flutter#219    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
flutter#220    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
flutter#221    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
flutter#222    StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
flutter#223    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
flutter#224    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
flutter#225    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
flutter#226    StatelessElement.update (package:flutter/src/widgets/framework.dart:5162:5)
flutter#227    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
flutter#228    SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6442:14)
flutter#229    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
flutter#230    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
flutter#231    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
flutter#232    ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
flutter#233    _InheritedNotifierElement.update (package:flutter/src/widgets/inherited_notifier.dart:107:11)
flutter#234    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
flutter#235    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
flutter#236    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
flutter#237    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
flutter#238    StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
flutter#239    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
flutter#240    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
flutter#241    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
flutter#242    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
flutter#243    StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
flutter#244    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
flutter#245    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
flutter#246    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
flutter#247    ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
flutter#248    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
flutter#249    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
flutter#250    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
flutter#251    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
flutter#252    StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
flutter#253    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
flutter#254    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
flutter#255    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
flutter#256    ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
flutter#257    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
flutter#258    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
flutter#259    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
flutter#260    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
flutter#261    StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
flutter#262    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
flutter#263    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
flutter#264    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
flutter#265    ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
flutter#266    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
flutter#267    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
flutter#268    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
flutter#269    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
flutter#270    StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
flutter#271    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
flutter#272    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
flutter#273    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
flutter#274    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
flutter#275    StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
flutter#276    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
flutter#277    SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6442:14)
flutter#278    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
flutter#279    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
flutter#280    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
flutter#281    ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
flutter#282    _InheritedNotifierElement.update (package:flutter/src/widgets/inherited_notifier.dart:107:11)
flutter#283    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
flutter#284    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
flutter#285    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
flutter#286    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
flutter#287    StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
flutter#288    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
flutter#289    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
flutter#290    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
flutter#291    ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
flutter#292    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
flutter#293    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
flutter#294    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
flutter#295    ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
flutter#296    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
flutter#297    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
flutter#298    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
flutter#299    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
flutter#300    StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
flutter#301    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
flutter#302    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
flutter#303    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
flutter#304    ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
flutter#305    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
flutter#306    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
flutter#307    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
flutter#308    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
flutter#309    StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
flutter#310    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
flutter#311    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
flutter#312    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
flutter#313    ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
flutter#314    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
flutter#315    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
flutter#316    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
flutter#317    StatelessElement.update (package:flutter/src/widgets/framework.dart:5162:5)
flutter#318    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
flutter#319    RenderObjectToWidgetElement._rebuild (package:flutter/src/widgets/binding.dart:1253:16)
flutter#320    RenderObjectToWidgetElement.update (package:flutter/src/widgets/binding.dart:1230:5)
flutter#321    RenderObjectToWidgetElement.performRebuild (package:flutter/src/widgets/binding.dart:1244:7)
flutter#322    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
flutter#323    BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2780:19)
flutter#324    AutomatedTestWidgetsFlutterBinding.drawFrame (package:flutter_test/src/binding.dart:1396:19)
flutter#325    RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:358:5)
flutter#326    SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1297:15)
flutter#327    SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1227:9)
flutter#328    AutomatedTestWidgetsFlutterBinding.pump.<anonymous closure> (package:flutter_test/src/binding.dart:1246:9)
flutter#331    TestAsyncUtils.guard (package:flutter_test/src/test_async_utils.dart:68:41)
flutter#332    AutomatedTestWidgetsFlutterBinding.pump (package:flutter_test/src/binding.dart:1232:27)
flutter#333    WidgetTester._pumpWidget (package:flutter_test/src/widget_tester.dart:587:20)
flutter#334    WidgetTester.pumpWidget.<anonymous closure> (package:flutter_test/src/widget_tester.dart:572:14)
flutter#337    TestAsyncUtils.guard (package:flutter_test/src/test_async_utils.dart:68:41)
flutter#338    WidgetTester.pumpWidget (package:flutter_test/src/widget_tester.dart:571:27)
flutter#339    main.<anonymous closure>.<anonymous closure> (file:///Volumes/MyExternal/ExternalRefCode/flutter/packages/flutter/test/material/text_field_test.dart:15687:20)
<asynchronous suspension>
<asynchronous suspension>
(elided 5 frames from dart:async and package:stack_trace)

����������������������������������������������������������������������������������������������������
00:06 +0 -1: context menu contextMenuBuilder changes from default to null [E]                                                         
  Test failed. See exception logs above.
  The test description was: contextMenuBuilder changes from default to null
  
To run this test again: /Volumes/MyExternal/ExternalRefCode/flutter/bin/cache/dart-sdk/bin/dart test /Volumes/MyExternal/ExternalRefCode/flutter/packages/flutter/test/material/text_field_test.dart -p vm --plain-name 'context menu contextMenuBuilder changes from default to null'
00:06 +0 -1: Some tests failed.                                                                                                       
(base) �  flutter git:(feat/text-field-npe) 

```

</details>
DanTup pushed a commit that referenced this pull request Aug 31, 2023
This is a follow up to the following pull requests:
- flutter#124514

I was finally able to reproduce this bug and found out why it was happening. Consider this code:

```dart
GestureDetector(
  behavior: HitTestBehavior.translucent,
  // Note: Make sure onTap is not null to ensure events
  // are captured by `GestureDetector`
  onTap: () {},
  child: _shouldShowSlider
    ? Slider(value: _value, onChanged: _handleSlide)
    : const SizedBox.shrink().
)
```

Runtime exception happens when:

1. User taps and holds the Slider (drag callback captured by `GestureDetector`)
2. `_shouldShowSlider` changes to false, Slider disappears and unmounts, and unregisters `_handleSlide`. But the callback is still registered by `GestureDetector`
3. Users moves finger as if Slider were still there
4. Drag callback is invoked, `_SliderState.showValueIndicator` is called
5. Exception - Slider is already disposed

This pull request fixes it by adding a mounted check inside `_SliderState.showValueIndicator` to ensure the Slider is actually mounted at the time of invoking drag event callback. I've added a unit test that will fail without this change.

The error stack trace is:

```
The following assertion was thrown while handling a gesture:
This widget has been unmounted, so the State no longer has a context (and should be considered
defunct).
Consider canceling any active work during "dispose" or using the "mounted" getter to determine if
the State is still active.

When the exception was thrown, this was the stack:
#0      State.context.<anonymous closure> (package:flutter/src/widgets/framework.dart:950:9)
#1      State.context (package:flutter/src/widgets/framework.dart:956:6)
#2      _SliderState.showValueIndicator (package:flutter/src/material/slider.dart:968:18)
#3      _RenderSlider._startInteraction (package:flutter/src/material/slider.dart:1487:12)
#4      _RenderSlider._handleDragStart (package:flutter/src/material/slider.dart:1541:5)
#5      DragGestureRecognizer._checkStart.<anonymous closure> (package:flutter/src/gestures/monodrag.dart:531:53)
#6      GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:275:24)
#7      DragGestureRecognizer._checkStart (package:flutter/src/gestures/monodrag.dart:531:7)
#8      DragGestureRecognizer._checkDrag (package:flutter/src/gestures/monodrag.dart:498:5)
#9      DragGestureRecognizer.acceptGesture (package:flutter/src/gestures/monodrag.dart:431:7)
#10     _CombiningGestureArenaMember.acceptGesture (package:flutter/src/gestures/team.dart:45:14)
#11     GestureArenaManager._resolveInFavorOf (package:flutter/src/gestures/arena.dart:281:12)
#12     GestureArenaManager._resolve (package:flutter/src/gestures/arena.dart:239:9)
#13     GestureArenaEntry.resolve (package:flutter/src/gestures/arena.dart:53:12)
#14     _CombiningGestureArenaMember._resolve (package:flutter/src/gestures/team.dart:85:15)
#15     _CombiningGestureArenaEntry.resolve (package:flutter/src/gestures/team.dart:19:15)
#16     OneSequenceGestureRecognizer.resolve (package:flutter/src/gestures/recognizer.dart:375:13)
#17     DragGestureRecognizer.handleEvent (package:flutter/src/gestures/monodrag.dart:414:13)
#18     PointerRouter._dispatch (package:flutter/src/gestures/pointer_router.dart:98:12)
#19     PointerRouter._dispatchEventToRoutes.<anonymous closure> (package:flutter/src/gestures/pointer_router.dart:143:9)
#20     _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:625:13)
#21     PointerRouter._dispatchEventToRoutes (package:flutter/src/gestures/pointer_router.dart:141:18)
#22     PointerRouter.route (package:flutter/src/gestures/pointer_router.dart:127:7)
#23     GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:488:19)
#24     GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:468:22)
#25     RendererBinding.dispatchEvent (package:flutter/src/rendering/binding.dart:439:11)
#26     GestureBinding._handlePointerEventImmediately (package:flutter/src/gestures/binding.dart:413:7)
#27     GestureBinding.handlePointerEvent (package:flutter/src/gestures/binding.dart:376:5)
#28     GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:323:7)
#29     GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:292:9)
#30     _invoke1 (dart:ui/hooks.dart:186:13)
#31     PlatformDispatcher._dispatchPointerDataPacket (dart:ui/platform_dispatcher.dart:433:7)
#32     _dispatchPointerDataPacket (dart:ui/hooks.dart:119:31)

Handler: "onStart"
Recognizer:
  HorizontalDragGestureRecognizer#a5df2
```

*List which issues are fixed by this PR. You must list at least one issue.*

Internal bug: b/273666179, b/192329942

*If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].*
DanTup pushed a commit that referenced this pull request May 21, 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
DanTup pushed a commit that referenced this pull request Jun 10, 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
#3  _RenderDeferredLayoutBox.redepthChildren           overlay.dart:2576
#4  RenderObject.redepthChild
#5  RenderObject.adoptChild
#6  _RenderTheater._addDeferredChild                   overlay.dart:1312
#7  _OverlayEntryLocation._addChild                    overlay.dart:2185
#8  _OverlayPortalElement.insertRenderObjectChild      overlay.dart:2447
...
#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 <[email protected]>
DanTup pushed a commit that referenced this pull request Aug 6, 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>
           #3      _BuildIOSSubCommand.runCommand (package:flutter_tools/src/commands/build_ios.dart:986:37)
           <asynchronous suspension>
           #4      BuildIOSArchiveCommand.runCommand (package:flutter_tools/src/commands/build_ios.dart:477:50)
           <asynchronous suspension>
           #5      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1590:27)
           <asynchronous suspension>
           #6      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:154:19)
           <asynchronous suspension>
           #7      CommandRunner.runCommand (package:args/command_runner.dart:212:13)
           <asynchronous suspension>
           #8      FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:496:9)
           <asynchronous suspension>
           #9      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:154:19)
           <asynchronous suspension>
           #10     FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:431:5)
           <asynchronous suspension>
           #11     FlutterCommandRunner.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:307:33)
           <asynchronous suspension>
           #12     run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:104:11)
           <asynchronous suspension>
           #13     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:154:19)
           <asynchronous suspension>
           #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 <[email protected]>
DanTup pushed a commit that referenced this pull request Oct 21, 2026
…t API (flutter#193717)

PR 7 ([flutter#193693](flutter#193693)) merged
to `master` as `ecd1ab06865`, and `23ddd6b74e6` merges `master` into
this branch, so the [Files
changed](https://github.com/flutter/flutter/pull/193717/files) tab shows
only PR 8's changes.

PR 8 commits:
- `8c9a54d8297` Unify add-to-app module wiring on the variant API
- `2c28d8f8245` Merge PR 7 head `f668780fd47` (conflicts resolved to PR
7's wording where PR 8 does not change the code)
- `a6be16034c8` Trim comments added by PR 8
- `b8cd39bcf81` Address review: clarify the variant gate and task
registration comments
- `2efbd345505` Address review: check the add-to-app module in
module_host_with_custom_build_test
- `d8f869ec468` Address review: share task registration stubs in
FlutterPluginTest
- `798ac295725` Address review: take ApplicationVariant in
configureApplicationOutputs
- `1366874099e` Address review: drop
android.compatibility.enableLegacyApi from the qa section
- `eb20bbd43de` Merge PR 7 head `25550b3fc49` (no conflicts)
- `23ddd6b74e6` Merge `master` at `ecd1ab06865` (PR 7 squash-merged).
`FlutterPlugin.kt`, `FlutterPluginUtils.kt` and `FlutterPluginTest.kt`
conflicted only because the squash commit is not an ancestor; `master`'s
copies are identical to `25550b3fc49`, already merged by `eb20bbd43de`,
so this branch's side was kept.

## Description

This is PR 8 of 11 in the AGP 9.1.0 / public `gradle-api` migration
stack ([flutter#180137](flutter#180137),
[flutter#166550](flutter#166550)).

An add-to-app module (an Android library) is wired through the same
`androidComponents.onVariants` path as an app. The module adds Flutter's
assets and native libraries to its own variants, and the host app
consumes them like any Android library. Flutter does not look up or
configure the host project. With this PR, a host app with AGP 9's
`android.newDsl=true` builds a Flutter module from source; on
`33f39876b92` it fails with `Check failed.` while configuring `:app`.

**Breaking:** `flutter.hostAppProjectName` has no effect. Setting it
logs a warning.

**Base:** `master`. PR 7 (flutter#193693) merged as `ecd1ab06865`.

<details>
<summary>Agent authored details</summary>

### Changes

1. **Module variants on `onVariants`** (`FlutterPlugin.kt`
`addFlutterTasks`). For every variant, app or library, `onVariants`
calls `registerFlutterCompileTask`, `registerFlutterAssetTasks` and
`registerFlutterJniLibsTask`. Only application variants then call the
new `configureApplicationOutputs` (per-ABI versionCodes and the
flutter-apk copy), which takes an `ApplicationVariant`. There is no
mid-lambda `return@onVariants`.
2. **Every module variant is configured.**
`shouldCompileFlutterForVariant` returns true for a `LibraryVariant`.
The command-line check (`shouldConfigureFlutterTask`, flutter#109560) compares
the command line with the project's own `assemble<Variant>` names, and a
host task such as `:app:assembleDemoStaging` never matches the module
variant it consumes (`debug`, via `matchingFallbacks`). A module has
three variants: the template's `debug` and `release`, plus the `profile`
build type the plugin creates. It declares no flavors
(`templates/module/android/library_new_embedding/Flutter.tmpl/build.gradle.tmpl`).
The tasks are registered lazily, so a build runs only the module variant
the host consumes. `--dry-run` on a host with flavor `demo` and build
types `staging` (falls back to `debug`) and `prod` (falls back to
`release`):

   | Host task | Module Flutter tasks in the task graph |
   | --- | --- |
| `app:assembleDemoDebug`, `app:assembleDemoStaging` |
`compileFlutterBuildDebug`, `copyFlutterAssetsDebug`,
`copyJniLibsflutterBuildDebug` |
| `app:assembleDemoRelease`, `app:assembleDemoProd` |
`compileFlutterBuildRelease`, `copyFlutterAssetsRelease`,
`copyJniLibsflutterBuildRelease` |

3. **Build mode from the module variant.** `registerFlutterCompileTask`
reads the library variant's `buildType` and public
`Component.debuggable`, so the mode follows the module variant the host
consumes.
4. **jniLibs wired from the compile task provider.**
`registerFlutterJniLibsTask` takes `compileTaskProvider` and sets
`intermediateDir` from `compileTaskProvider.map { it.outputDirectory }`.
The `tasks.matching { it.name == … }` dependency and the `findByName`
provider are gone. Both copy tasks are registered only together with
their compile task, so `intermediateDir` is required (not `@Optional`)
in `CopyFlutterJniLibsTask` and `CopyFlutterAssetsTask`, and their
`isPresent` branches are removed.
5. **`flutter.hostAppProjectName`.** `warnIfHostAppProjectNameIsSet`
reads `project.providers.gradleProperty(…)` (not
`rootProject.hasProperty`) and logs `Warning: The Gradle property
'flutter.hostAppProjectName' has no effect. Remove it from
gradle.properties.` The `flutter.hostAppProjectName=SampleApp` line is
removed from
`dev/integration_tests/pure_android_host_apps/android_custom_host_app/gradle.properties`,
so devicelab `module_custom_host_app_name_test` (host project
`:SampleApp`) checks that a host not named `app` builds without the
property.
6. **Deleted:**
- From `FlutterPlugin.kt`: the host-project lookup, the
`appProject.afterEvaluate` × `libraryVariants.all` ×
`applicationVariants.all` loop, the `merge<HostVariant>Assets.dependsOn`
edge, `addFlutterDepsForModule` and `addCopyFlutterAssetsDependency`.
- From `FlutterPluginUtils.kt`: `shouldConfigureFlutterTask(Project,
Task)` and `buildModeFor(com.android.builder.model.BuildType)`. Both
lost their last caller.
7. **Docs.**
- `Migrating-Flutter-Gradle-Plugin-to-AGP-public-API.md`: decision
record 5 and "Features that must break" item 6 are rewritten.
-
[`website-page-draft.md`](https://github.com/flutter/flutter/blob/master/docs/platforms/android/website-page-draft.md)
(publishing tracked in
[flutter#193713](flutter#193713)): the
add-to-app section is rewritten.
- The text these replace said that the warning names a removal milestone
(it does not), and that a host `staging` debuggable build type gets
debug artifacts (the module variant decides). It also said that
`tasks.getByPath(":flutter:copyFlutterAssetsDebug")` fails with "Task
with path … not found". That is false: in the scratch host below it
returns a `CopyFlutterAssetsTask`.
8. **Tests.**
   - New `FlutterPluginTest` cases:
- jniLibs wiring from the compile task provider, with no name lookups;
- a module variant configured for a single unrelated command-line task,
with no APK wiring;
     - the module build mode for `debug`, `profile` and `release`;
- the `hostAppProjectName` warning, with no host lookup, and no warning
when it is unset.
   - The skip test also checks that no jniLibs task is registered.
- The new tests share stub helpers (`stubTaskRegistration`,
`captureTaskConfiguration`, `setCommandLineTasks`).
- devicelab `module_host_with_custom_build_test` gets a final section.
The host fixture adds a build type `qa` (debuggable, falls back to
`release`). The section runs `app:assembleDemoQa` with
`android.newDsl=true` and `flutter.hostAppProjectName=app`. It checks
that the output has the warning, and that `app-demo-qa.apk` has the
Flutter assets and `libapp.so` for arm64-v8a and armeabi-v7a, and no
debug assets. The existing sections already check
`app:assembleDemoStaging` (debug artifacts).

### Audit resolution

[PR 8 draft
audit](reidbaker-agent#8 (comment)):

| Item | Resolution |
| --- | --- |
| 1. String-based compile task lookup for jniLibs | Provider wiring,
`FlutterPlugin.kt:549-553`. Unit test `onVariants wires the jniLibs copy
to the output of the variant's compile task`. |
| 2. Mid-block `return@onVariants` | None. `onVariants` (`:329-350`)
calls helpers; app-only wiring is in `configureApplicationOutputs`
(`:647`). |
| 3. Redundant `dependsOn` | None on the assets copy (`:497-530`) or the
jniLibs copy (`:536-560`). |
| 4. Dead overload; `rootProject` read; fixture property |
`shouldConfigureFlutterTask(Project, Task)` deleted.
`providers.gradleProperty` at `:665`. Fixture line removed. |

[PR 7 draft
audit](reidbaker-agent#7 (comment)):
its four items were resolved in flutter#193693. The stale "registered in
`applicationVariants`" KDoc it named has no counterpart here; the
`registerFlutterCompileTask` KDoc names no project type.

### Why removing the deleted code is safe

- The deleted module path used
`com.android.build.gradle.LibraryExtension.libraryVariants`,
`AbstractAppExtension.applicationVariants`,
`BaseVariant.mergeAssetsProvider` and
`BaseVariantOutput.processResourcesProvider`. AGP does not register
those extensions with `android.newDsl=true`, which is why `33f39876b92`
fails with `Check failed.` in the host `afterEvaluate` block that looks
up `LibraryExtension`. Its replacements (`LibraryVariant`,
`Component.debuggable`,
`Sources.assets`/`jniLibs.addGeneratedSourceDirectory`) are public
`com.android.build.api` APIs. FGP compiles against AGP 9.1.1, the
minimum on `master` (flutter#193813), and `Component.getDebuggable` also exists
in gradle-api 8.11.1 (checked with `javap`).
- Remaining `hostAppProjectName` users: none. `git grep
hostAppProjectName` hits only this PR's code, tests and docs, plus an
unrelated iOS `XcodeProject.hostAppProjectName` in the tool. The
templates, `include_flutter.groovy`, `module_plugin_loader.gradle` and
devicelab do not read it. devicelab `module_custom_host_app_name_test`
(host project `:SampleApp`) passes without the fixture property.
- `com.android.builder.model.BuildType` and
`shouldConfigureFlutterTask(Project, Task)` have no remaining
references.

### Removed comments, docstrings and tests

| Removed | Reason |
| --- | --- |
| KDoc and two `TODO(gmackall)` comments (flutter#166550) on
`addFlutterDepsForModule`; KDoc on `addCopyFlutterAssetsDependency` |
Functions deleted. flutter#166550 stays open for the rest of the stack. |
| The "host app build variant → Flutter variant" table comment in the
module block | The mapping is gone; the module variant decides the mode.
|
| KDoc of `shouldConfigureFlutterTask(Project, Task)` and
`buildModeFor(ModelBuildType)` | Functions deleted. |
| `flutterCompileTaskName` KDoc | Nothing references the task by name,
and the one-line name builder needs no doc. |
| flutter#188785 comment in `registerFlutterJniLibsTask`, and the `@Optional`
KDoc and "no Flutter build" comment in `CopyFlutterJniLibsTask` | The
jniLibs task is registered only with its compile task.
`gradle_libapp_so_packaging_test` "app:assembleAndroidTest builds when
no Flutter compile task is configured" still passes. |
| `@Optional` KDoc on `CopyFlutterAssetsTask.intermediateDir` (it kept
`@Optional` for the module migration) | The migration is this PR. |
| `FlutterPluginUtilsTest`: `buildModeFor returns profile if the
BuildType has name profile`, `buildModeFor returns debug if the
BuildType is debuggable`, `buildModeFor returns release if the BuildType
is not debuggable and not named profile` | Overload deleted.
`buildModeFor with a name and debuggable flag prefers the profile name
over debuggability` covers the same cases. |
| `FlutterPluginUtilsTest`: four `shouldConfigureFlutterTask` tests used
a mocked `Task` | Kept with the same names and inputs, calling the
`String` overload. |
| `CopyFlutterAssetsTaskTest`: `clears the destination directory when
there is no flutter build for the variant` | The input is required, so
that case cannot happen. Replaced by `removes staged assets that the
flutter build does not produce`, which keeps the stale-file check. |
| Comments trimmed per review (`a6be16034c8`): the
`PROP_HOST_APP_PROJECT_NAME` KDoc; the `registerFlutterJniLibsTask` KDoc
sentence naming its compile task; the "An application project only has
application variants." comment above the `check`; restatements in the
KDoc of `shouldCompileFlutterForVariant` (PR 7's paragraph restored
verbatim), `registerFlutterCompileTask`, `configureApplicationOutputs`,
`warnIfHostAppProjectNameIsSet` and both `intermediateDir`s; test helper
KDocs and integration test comments; migration doc item 6 | Each
restated the code. What remains is why library variants are ungated, why
the inputs are required, and the test intent. Added code-comment lines
vs `f668780fd47`: 85 → 39. |
|
`packages/flutter_tools/test/integration.shard/android_add_to_app_module_test.dart`
(added by this PR, then deleted per review, `2efbd345505`) | Its `qa`
check moved into devicelab `module_host_with_custom_build_test`, which
builds the same fixture. Its `staging` check duplicated the devicelab
staging section, except for `android.newDsl=true`. The devicelab task
runs presubmit on Linux, Mac and Windows (`.ci.yaml`), like the deleted
test. |
| Rewritten per review (`b8cd39bcf81`): the library paragraph of the
`shouldCompileFlutterForVariant` KDoc, the assets `GradleException`
comment, the `registerFlutterCompileTask` and
`configureApplicationOutputs` KDocs | They explained too little ("What
does this mean?") or restated the code. |
| The `check(variant is ApplicationVariant)` that PR 7 added in the app
`onVariants` path, moved by this PR into `configureApplicationOutputs`
(`798ac295725`) | The call site branches on `variant is
ApplicationVariant`, and the function takes an `ApplicationVariant`, so
the compiler enforces the type. In an application project every variant
is an `ApplicationVariant`, so the APK wiring runs for the same
variants. |
| `-Pandroid.compatibility.enableLegacyApi=false` in the devicelab `qa`
section (`1366874099e`) | AGP 9.1.0, 9.1.1 and 9.3.1 mark the option
`Deprecated(VERSION_10_0)`. Its consumers back the variant API that
`android.newDsl=true` removes. |

### Behavioral and compatibility notes

1. **`flutter.hostAppProjectName` has no effect (breaking).** It logs a
warning and names no removal milestone. Its only use was the host
lookup.
2. **The Flutter build mode follows the module variant the host
consumes.** A host `debug`/`profile`/`release` consumes the module
variant of the same name. A custom host build type gets the module
variant its `matchingFallbacks` select. With a debuggable `qa` that
falls back to `release`, built as the only task, the APKs contain:

   | Build | `flutter_assets` | `libapp.so` | Flutter tasks run |
   | --- | --- | --- | --- |
| `33f39876b92` (`newDsl=false`) | no | no | `compileFlutterBuildDebug`
(not packaged) |
   | This PR | yes | yes | `compileFlutterBuildRelease` |

3. **A host `assemble<Variant>AndroidTest` run on its own runs the
module's `flutter assemble` for that variant.** `--dry-run` of
`:app:assembleDemoDebugAndroidTest` lists
`:flutter:compileFlutterBuildDebug` with this PR, and only
`copyJniLibsflutterBuildDebug` on `33f39876b92`. This is a cost,
accepted because the module cannot map host task names to its own
variants.
4. **Module assets are a generated assets source directory.** The
deleted code copied them into the module's merged-assets output after
`mergeAssets`, and made every build re-run `clean<MergeAssetsTask>`.
Collisions resolve by source-set priority, as for apps since PR 6.
5. **`copyFlutterAssets<V>` in a module is a `CopyFlutterAssetsTask`,
not a `Copy`.** Lookups by name still work; lookups typed as `Copy`
fail.
6. Related open work:
[flutter#191703](flutter#191703) reports an
NPE in `getLegacyAndroidExtension` with `newDsl=true`. That function was
removed earlier in the stack, and this PR removes the next failure on
that path. A module with plugins on `newDsl=true` is not tested here. No
conflict with
[flutter#193682](flutter#193682) or
[flutter#193610](flutter#193610)
(`gradle_errors.dart`); this PR changes no message that the tool
matches. [flutter#184409](flutter#184409)
asks for separate library and app logic in `addFlutterTasks`; this PR
shares `onVariants` and splits only the app outputs.

### Integration test coverage of the changed paths

| Path | Tests |
| --- | --- |
| Module from source, `newDsl=true`, debuggable custom build type on
`release`, `hostAppProjectName` warning | devicelab
`module_host_with_custom_build_test`, `app:assembleDemoQa` section |
| Module from source, flavor and custom build types, debug and release |
devicelab `module_host_with_custom_build_test` (other sections;
`app:assembleDemoStaging` needs the ungated `LibraryVariant`),
`build_android_host_app_with_module_source` |
| Host project not named `app`, without `hostAppProjectName` | devicelab
`module_custom_host_app_name_test` |
| Module AAR (`flutter build aar`) and AAR host | devicelab
`build_aar_module_test`, `build_android_host_app_with_module_aar`;
`android_obfuscate_test`, `android_plugin_new_output_dir_test` |
| App path | `gradle_libapp_so_packaging_test`,
`flutter_build_apk_split_per_abi_test`,
`android_gradle_asset_merging_test`,
`android_run_flutter_gradle_plugin_tests_test` |

### Tests run locally (macOS, JDK 17)

On the head after merging `master` (`23ddd6b74e6`; FGP compiles and
tests against AGP 9.1.1):

- `./gradlew test --rerun-tasks` in `packages/flutter_tools/gradle`: 33
suites, 277 tests, 0 failures.
- ktlint 1.5.0 with the CI `.editorconfig` and baseline: clean.
- `dart format` and `dart analyze --fatal-infos` on
`module_host_with_custom_build_test.dart` and
`gradle_libapp_so_packaging_test.dart`: clean.
- `gradle_libapp_so_packaging_test`: 4 tests pass.
- devicelab, all `success`: `module_host_with_custom_build_test`,
`module_custom_host_app_name_test`,
`build_android_host_app_with_module_source`.

On `1366874099e`:

- `./gradlew test --rerun-tasks` in `packages/flutter_tools/gradle`: 33
suites, 274 tests, 0 failures.
- ktlint 1.5.0 with the CI `.editorconfig` and baseline: clean.
- `dart format` and `dart analyze --fatal-infos` on
`module_host_with_custom_build_test.dart`: clean.
- devicelab `module_host_with_custom_build_test`: `success`. The
`app:assembleDemoQa` section ran `./gradlew app:assembleDemoQa
-Pandroid.newDsl=true -Pflutter.hostAppProjectName=app` and logged the
`flutter.hostAppProjectName` warning.

On `d8f869ec468`:

- `./gradlew test --rerun-tasks` in `packages/flutter_tools/gradle`: 33
suites, 274 tests, 0 failures.
- ktlint 1.5.0 with the CI `.editorconfig` and baseline: clean.
- `dart format` and `dart analyze --fatal-infos` on
`module_host_with_custom_build_test.dart`: clean.
- devicelab `module_host_with_custom_build_test`: `success`. The
`app:assembleDemoQa` section logged the `flutter.hostAppProjectName`
warning.

On `a6be16034c8` (the merge and the trim):

- `./gradlew test` in `packages/flutter_tools/gradle`: 33 suites, 274
tests, 0 failures.
- ktlint 1.5.0 with the CI `.editorconfig` and baseline: clean.
- `dart format` and `dart analyze --fatal-infos` on the changed Dart
files: clean.
- `android_add_to_app_module_test` (deleted in `2efbd345505`): passes.
- devicelab `module_custom_host_app_name_test` (fixture without
`flutter.hostAppProjectName`): `success`, and the log has no
`hostAppProjectName` warning.

On `8c9a54d8297` (before the merge of PR 7's review changes and the
comment trim):

- Integration tests, one at a time, all pass:
`android_add_to_app_module_test` (1), `android_obfuscate_test` (2),
`android_plugin_new_output_dir_test` (1),
`gradle_libapp_so_packaging_test` (4),
`flutter_build_apk_split_per_abi_test` (4),
`android_gradle_asset_merging_test` (4),
`android_run_flutter_gradle_plugin_tests_test` (2).
- `android_add_to_app_module_test` on `33f39876b92`: fails with `Check
failed.`. With `variant is LibraryVariant ||` removed: fails with "does
not contain 'assets/flutter_assets/AssetManifest.bin'".
- devicelab via `bin/test_runner.dart test --exit`, all `success`:
`module_host_with_custom_build_test`,
`module_custom_host_app_name_test`,
`build_android_host_app_with_module_source`, `build_aar_module_test`,
`build_android_host_app_with_module_aar`.
- Scratch module plus the devicelab host fixture (AGP 9.3.1, Gradle
9.5.0):
- Defaults: `assembleDemoStaging` has `kernel_blob.bin` and no
`libapp.so`; `assembleDemoRelease` has `libapp.so` for arm64-v8a,
armeabi-v7a and x86_64.
- Same with `android.compatibility.enableLegacyApi=false`, and with
`android.newDsl=true` added.

</details>

---

## 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 in-code documentation (doc comments with
`///`).
- [x] If this PR introduces a new feature or capability, I created and
linked a website documentation issue or PR in [flutter/website] (or
verified none is needed).
- [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.

<!-- 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
[flutter/website]: https://github.com/flutter/website
[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
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.

0 participants