Skip to content

Compatibility bridge for analyzer 12 and 13.#185360

Merged
auto-submit[bot] merged 2 commits into
flutter:masterfrom
scheglov:analyzer-12-13-compatibility
Apr 21, 2026
Merged

Compatibility bridge for analyzer 12 and 13.#185360
auto-submit[bot] merged 2 commits into
flutter:masterfrom
scheglov:analyzer-12-13-compatibility

Conversation

@scheglov

@scheglov scheglov commented Apr 21, 2026

Copy link
Copy Markdown
Contributor

Solution for #185339

List which issues are fixed by this PR. You must list at least one issue. An issue is not required if the PR fixes something trivial like a typo.

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

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. 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.

@github-actions github-actions Bot added engine flutter/engine related. See also e: labels. platform-web Web applications specifically labels Apr 21, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request implements compatibility bridges for the analyzer package using dynamic property access and try-catch blocks to handle API differences. The review feedback suggests optimizing performance by moving helper functions out of loops, improving readability by simplifying dynamic unwrapping logic, and removing commented-out code blocks in favor of TODOs to maintain repository cleanliness.

Comment thread engine/src/flutter/web_sdk/test/api_conform_test.dart Outdated
Comment thread engine/src/flutter/web_sdk/test/api_conform_test.dart Outdated
Comment on lines +237 to +248
// Clean Analyzer 13 version (uncomment once migrated):
// if (uiParam is RegularFormalParameter && webParam is RegularFormalParameter) {
// final isUiNullable = uiParam.type?.question != null;
// final isWebNullable = webParam.type?.question != null;
// if (isUiNullable != isWebNullable) {
// failed = true;
// print(
// 'Warning: lib/ui/ui.dart $className.$methodName parameter $i '
// '${uiParam.name} has a different nullability than in lib/web_ui/ui.dart.',
// );
// }
// }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Avoid including large blocks of commented-out code. While it serves as a reference for the post-migration state, it adds clutter and can become outdated. Consider using a TODO comment instead.

References
  1. Write what you need and no more, but when you write it, do it right. (link)

Comment thread engine/src/flutter/tools/api_check/test/apicheck_test.dart Outdated
Comment on lines +277 to +280
// Clean Analyzer 13 version (uncomment once migrated):
// if (parameter is RegularFormalParameter) {
// type = parameter.type;
// }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Avoid including commented-out code blocks. If this is intended for a future migration, consider using a TODO comment instead.

References
  1. Write what you need and no more, but when you write it, do it right. (link)

@rmacnak-google rmacnak-google requested a review from aam April 21, 2026 21:23
@rmacnak-google rmacnak-google added the autosubmit Merge PR when tree becomes green via auto submit App label Apr 21, 2026
@auto-submit auto-submit Bot added this pull request to the merge queue Apr 21, 2026
Merged via the queue into flutter:master with commit 16fa54c Apr 21, 2026
198 of 199 checks passed
@flutter-dashboard flutter-dashboard Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Apr 21, 2026
auto-submit Bot pushed a commit to flutter/packages that referenced this pull request Apr 23, 2026
flutter/flutter@3d0e822...5e4f169

2026-04-22 engine-flutter-autoroll@skia.org Roll Skia from f12c89580766 to 11640d1cbc5c (3 revisions) (flutter/flutter#185418)
2026-04-22 engine-flutter-autoroll@skia.org Roll Packages from 7c8e13e to 4a2091d (2 revisions) (flutter/flutter#185417)
2026-04-22 engine-flutter-autoroll@skia.org Roll Skia from f765937d0639 to f12c89580766 (1 revision) (flutter/flutter#185410)
2026-04-22 engine-flutter-autoroll@skia.org Roll Skia from 635b78342e75 to f765937d0639 (1 revision) (flutter/flutter#185406)
2026-04-22 engine-flutter-autoroll@skia.org Roll Skia from cda2af3f5c2e to 635b78342e75 (3 revisions) (flutter/flutter#185393)
2026-04-22 engine-flutter-autoroll@skia.org Roll Skia from 632a41e2baba to cda2af3f5c2e (3 revisions) (flutter/flutter#185390)
2026-04-22 engine-flutter-autoroll@skia.org Roll Skia from 019de7776cfa to 632a41e2baba (3 revisions) (flutter/flutter#185383)
2026-04-22 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Update libimobiledevice and dependencies (#181932)" (flutter/flutter#185385)
2026-04-22 rmolivares@renzo-olivares.dev Fix SelectableRegion crash when the selection starts in a scrollable child but does not select anything initially (flutter/flutter#184420)
2026-04-21 34871572+gmackall@users.noreply.github.com Fix timeout when `hybrid_android_views` fails `MotionEvent recomposition` (flutter/flutter#185003)
2026-04-21 srawlins@google.com [flutter] Remove dead check on null being in a set of non-nullables (flutter/flutter#184100)
2026-04-21 737941+loic-sharma@users.noreply.github.com Update the text input triage process to route to platform teams (flutter/flutter#185225)
2026-04-21 scheglov@google.com Compatibility bridge for analyzer 12 and 13. (flutter/flutter#185360)
2026-04-21 magder@google.com new_gallery_macos_impeller__transition_perf out of bringup (flutter/flutter#185355)
2026-04-21 engine-flutter-autoroll@skia.org Roll Skia from 21789d5e2fee to 019de7776cfa (9 revisions) (flutter/flutter#185365)
2026-04-21 magder@google.com Update libimobiledevice and dependencies (flutter/flutter#181932)
2026-04-21 magder@google.com platform_view_macos_impeller__start_up out of bringup (flutter/flutter#185354)
2026-04-21 magder@google.com complex_layout_scroll_perf_macos_impeller__timeline_summary out of bringup (flutter/flutter#185356)
2026-04-21 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from LPa7NLiXEZP2A7IwZ... to UdpQnaP5eSaDZd3-i... (flutter/flutter#185359)
2026-04-21 engine-flutter-autoroll@skia.org Roll Packages from 01c505f to 7c8e13e (4 revisions) (flutter/flutter#185361)
2026-04-21 737941+loic-sharma@users.noreply.github.com Improve the error if the tool cannot find the locally built engine (flutter/flutter#184546)
2026-04-21 engine-flutter-autoroll@skia.org Roll Skia from a234f0ed7245 to 21789d5e2fee (1 revision) (flutter/flutter#185349)
2026-04-21 victorsanniay@gmail.com Replace IndexedStack visibility children with _VisibilityScope + ExcludeFocus (flutter/flutter#184884)
2026-04-21 dacoharkes@google.com [data_assets] Try fix #184505 (flutter/flutter#185330)

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

To file a bug in Packages: 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
creatorpiyush pushed a commit to creatorpiyush/packages that referenced this pull request Jun 10, 2026
…r#11565)

flutter/flutter@3d0e822...5e4f169

2026-04-22 engine-flutter-autoroll@skia.org Roll Skia from f12c89580766 to 11640d1cbc5c (3 revisions) (flutter/flutter#185418)
2026-04-22 engine-flutter-autoroll@skia.org Roll Packages from 7c8e13e to 4a2091d (2 revisions) (flutter/flutter#185417)
2026-04-22 engine-flutter-autoroll@skia.org Roll Skia from f765937d0639 to f12c89580766 (1 revision) (flutter/flutter#185410)
2026-04-22 engine-flutter-autoroll@skia.org Roll Skia from 635b78342e75 to f765937d0639 (1 revision) (flutter/flutter#185406)
2026-04-22 engine-flutter-autoroll@skia.org Roll Skia from cda2af3f5c2e to 635b78342e75 (3 revisions) (flutter/flutter#185393)
2026-04-22 engine-flutter-autoroll@skia.org Roll Skia from 632a41e2baba to cda2af3f5c2e (3 revisions) (flutter/flutter#185390)
2026-04-22 engine-flutter-autoroll@skia.org Roll Skia from 019de7776cfa to 632a41e2baba (3 revisions) (flutter/flutter#185383)
2026-04-22 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Update libimobiledevice and dependencies (#181932)" (flutter/flutter#185385)
2026-04-22 rmolivares@renzo-olivares.dev Fix SelectableRegion crash when the selection starts in a scrollable child but does not select anything initially (flutter/flutter#184420)
2026-04-21 34871572+gmackall@users.noreply.github.com Fix timeout when `hybrid_android_views` fails `MotionEvent recomposition` (flutter/flutter#185003)
2026-04-21 srawlins@google.com [flutter] Remove dead check on null being in a set of non-nullables (flutter/flutter#184100)
2026-04-21 737941+loic-sharma@users.noreply.github.com Update the text input triage process to route to platform teams (flutter/flutter#185225)
2026-04-21 scheglov@google.com Compatibility bridge for analyzer 12 and 13. (flutter/flutter#185360)
2026-04-21 magder@google.com new_gallery_macos_impeller__transition_perf out of bringup (flutter/flutter#185355)
2026-04-21 engine-flutter-autoroll@skia.org Roll Skia from 21789d5e2fee to 019de7776cfa (9 revisions) (flutter/flutter#185365)
2026-04-21 magder@google.com Update libimobiledevice and dependencies (flutter/flutter#181932)
2026-04-21 magder@google.com platform_view_macos_impeller__start_up out of bringup (flutter/flutter#185354)
2026-04-21 magder@google.com complex_layout_scroll_perf_macos_impeller__timeline_summary out of bringup (flutter/flutter#185356)
2026-04-21 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from LPa7NLiXEZP2A7IwZ... to UdpQnaP5eSaDZd3-i... (flutter/flutter#185359)
2026-04-21 engine-flutter-autoroll@skia.org Roll Packages from 01c505f to 7c8e13e (4 revisions) (flutter/flutter#185361)
2026-04-21 737941+loic-sharma@users.noreply.github.com Improve the error if the tool cannot find the locally built engine (flutter/flutter#184546)
2026-04-21 engine-flutter-autoroll@skia.org Roll Skia from a234f0ed7245 to 21789d5e2fee (1 revision) (flutter/flutter#185349)
2026-04-21 victorsanniay@gmail.com Replace IndexedStack visibility children with _VisibilityScope + ExcludeFocus (flutter/flutter#184884)
2026-04-21 dacoharkes@google.com [data_assets] Try fix #184505 (flutter/flutter#185330)

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

To file a bug in Packages: 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CICD Run CI/CD engine flutter/engine related. See also e: labels. platform-web Web applications specifically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants