[material_ui, cupertino_ui, infra] Support skipping golden files for the design migration#11649
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a new internal package, flutter_goldens, to support Skia Gold integration for golden image testing. It includes CI script updates, configuration for cupertino_ui and material_ui packages, and the core implementation of custom golden file comparators. Feedback highlights the need for proper URI-to-path conversion using the path package, correcting the Dart SDK version, fixing an incorrect import in material_ui, and ensuring safer YAML parsing.
| description: The official Flutter Material UI Library, implementing Google's Material Design design system. | ||
| version: 0.0.1 | ||
| version: 0.0.2 | ||
| publish_to: none |
There was a problem hiding this comment.
Good call for now. I'll plan to remove this when we are ready to attempt to publish the first pre-release version.
There was a problem hiding this comment.
Ok thanks. Let me double check with Stuart before merging this.
| infra_step: true # Note infra steps failing prevents "always" from running. | ||
| - name: tool unit tests | ||
| script: .ci/scripts/plugin_tools_tests.sh | ||
| - name: flutter_goldens unit tests |
There was a problem hiding this comment.
If this package isn't intended to be run from Windows, you could just not add this here rather than fix the failures.
| path: 1.9.1 | ||
| platform: 3.1.6 | ||
| process: 5.0.5 | ||
| yaml: 3.1.3 |
There was a problem hiding this comment.
What is the plan for keeping these updated?
Also, since this is non-standard for this repo, it would be good to explain in a comment in this file why it's important that these be pinned instead of using the typical ^ dependencies.
There was a problem hiding this comment.
What is the plan for keeping these updated?
I am not sure yet given they are any in flutter/flutter we haven't had to consider that. I can take up as an action item for the full golden infra PR to resolve ongoing maintenance.
instead of using the typical ^ dependencies.
I don't think they need to be pinned, I just referred to the lock file in flutter/flutter to determine the right versions. If they weren't pinned, would ongoing maintenance be easier?
There was a problem hiding this comment.
If they weren't pinned, would ongoing maintenance be easier?
Yes; if they use a standard ^ range then they only need to be touched when there is a new major version, or someone is adding code that uses a newer feature that needs a higher minimum version (both of which are likely to be rare), rather than every single time we want to get a bugfix to any dependency.
There was a problem hiding this comment.
Ok cool. All green here, I am will add a section to the doc about maintaining this going forward. We need a better strategy for that in flutter/flutter anyways, recently we bumped the goldctl version that had not been updated in... maybe years.
…r#186350) flutter/packages@92552b1...19ec8b8 2026-05-11 49699333+dependabot[bot]@users.noreply.github.com Bump actions/labeler from 6.0.1 to 6.1.0 in the all-github-actions group (flutter/packages#11686) 2026-05-08 suojae.developer@gmail.com [flutter_svg] add imageBuilder property to SvgPicture (flutter/packages#11615) 2026-05-08 katelovett@google.com [material_ui, cupertino_ui, infra] Support skipping golden files for the design migration (flutter/packages#11649) 2026-05-08 stuartmorgan@google.com [video_player] Add missing swift_version to podspec (flutter/packages#11670) 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-flutter-autoroll Please CC flutter-ecosystem@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
This branches off of #10753 and strips it down to just the skipping comparator. This means when golden file testing is used with this version of flutter_goldens,
matchesGoldenFilewill return true in all environments without executing image comparison.The goal of this PR is to join the material_ui and cupertino_ui mega-migration PR (cc @justinmc ) to disable golden file testing for now in material_ui and cupertino_ui so we can get a clearer signal from CI about any remaining blockers.
Full golden file testing support will likely land in #10753 as a separate step given the enormity of these PRs.
cupertino_ui and material_ui are set
publish_to: nonehere, which is intentional. This allows us to split up these changes, and wait to publish until everything lands and is working as we want it to.Pre-Review Checklist
[shared_preferences]///).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. Comments from the
gemini-code-assistbot 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.Footnotes
Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. ↩ ↩2