Skip to content

[tool] Regenerate MockGitDir for package:git 2.5.0 - #13544

Merged
auto-submit[bot] merged 2 commits into
flutter:mainfrom
Piinks:update-script-tool-git-mock
Nov 4, 2026
Merged

auto-submit[bot] merged 2 commits into
flutter:mainfrom
Piinks:update-script-tool-git-mock

Conversation

@Piinks

@Piinks Piinks commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

package:git 2.4.0 and 2.5.0 were recently published to pub.dev and added an optional named parameter ({bool includeUntracked = true}) to GitDir.isWorkingTreeClean, along with several new methods on GitDir.

Because script/tool does not check in a pubspec.lock, dart pub get in CI (Linux repo_checks -> tool unit tests) now resolves git 2.5.0, causing package_command_test.dart to fail compilation against the checked-in MockGitDir:

test/common/package_command_test.mocks.dart:204:20: Error: The method 'MockGitDir.isWorkingTreeClean' has fewer named arguments than those of overridden method 'GitDir.isWorkingTreeClean'.
  _i6.Future<bool> isWorkingTreeClean() =>
                   ^

This PR:

  • Regenerates script/tool/test/common/package_command_test.mocks.dart with build_runner against package:git 2.5.0.
  • Leaves git: ^2.0.0 in script/tool/pubspec.yaml so that Linux analyze_legacy N-2 (which runs on Flutter 3.41.9 / Dart 3.11.5, whereas git >=2.4.0 requires Dart >=3.12.0) can still resolve git 2.3.2 when bootstrapping script/tool in prepare_tool.sh.

Part of flutter/flutter#195938

Pre-Review Checklist

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

Footnotes

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

@flutter-dashboard

This comment was marked as resolved.

@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 updates the git dependency in script/tool/pubspec.yaml from ^2.0.0 to ^2.5.0. It also updates the generated mock file script/tool/test/common/package_command_test.mocks.dart to include new mocked methods and imports from the updated git package. No review comments were provided.

@Piinks
Piinks requested a review from elliette November 3, 2026 23:02
@Piinks

Piinks commented Nov 3, 2026

Copy link
Copy Markdown
Contributor Author

Re: missing tests, the regenerated mocks are part of the tests. :)

@Piinks Piinks changed the title [tool] Update package:git to ^2.5.0 and regenerate MockGitDir [tool] Regenerate MockGitDir for package:git 2.5.0 Nov 3, 2026
@Piinks Piinks added the autosubmit Merge PR when tree becomes green via auto submit App label Nov 3, 2026
@auto-submit auto-submit Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Nov 3, 2026
@Piinks Piinks added the emergency Override tree-status signal (land even with closed tree), combine with the autosubmit label. label Nov 4, 2026
@flutter-dashboard

Copy link
Copy Markdown

Detected the emergency label.

If you add the autosubmit label, the bot will wait until all presubmits pass but ignore the tree status, allowing fixes for tree breakages while still validating that they don't break any existing presubmits.

The "Merge" button is also unlocked. To bypass presubmits as well as the tree status, press the GitHub "Add to Merge Queue".

@Piinks Piinks added the autosubmit Merge PR when tree becomes green via auto submit App label Nov 4, 2026
@auto-submit
auto-submit Bot merged commit b7e0312 into flutter:main Nov 4, 2026
12 of 13 checks passed
jpohhhh pushed a commit to Telosnex/flutter that referenced this pull request Nov 4, 2026
flutter/packages@1df8447...670b30e

2026-11-04 [email protected] [material_ui]
Inherit `IconButtonThemeData.variant` from enclosing themes
(flutter/packages#13263)
2026-11-04 [email protected] [tool] Regenerate `MockGitDir` for
`package:git` 2.5.0 (flutter/packages#13544)
2026-11-03 [email protected] [material_ui] Fix discrete Slider
selecting the neighboring tick near the track ends
(flutter/packages#12927)
2026-11-03 [email protected]
[material_ui] Migrate M3 Time Picker template to use new gen_defaults
(flutter/packages#13164)
2026-11-03 [email protected]
[camera_android_camerax] Update skills_lint to 0.5.3
(flutter/packages#13530)
2026-11-03 [email protected] Roll Flutter from
fcfb4f2 to 9347202 (38 revisions) (flutter/packages#13540)

If this roll has caused a breakage, revert this CL and set the roller
to dry run mode using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC [email protected] 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App CICD Run CI/CD emergency Override tree-status signal (land even with closed tree), combine with the autosubmit label. missing-tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants