Skip to content

[tool] Make more commands work without Flutter#11797

Merged
auto-submit[bot] merged 6 commits into
flutter:mainfrom
stuartmorgan-g:tool-reduce-flutter-requirement
May 28, 2026
Merged

[tool] Make more commands work without Flutter#11797
auto-submit[bot] merged 6 commits into
flutter:mainfrom
stuartmorgan-g:tool-reduce-flutter-requirement

Conversation

@stuartmorgan-g
Copy link
Copy Markdown
Collaborator

@stuartmorgan-g stuartmorgan-g commented May 27, 2026

  • Updates some cases where 'flutter' was used unconditionally, now that we need to support a repository without Flutter installed.
    • Removes some outdated comments and plumbing for forcing flutter pub over dart pub, as the reason we used to do it no longer applies now that dart pub also fetches examples by default.
  • Adds --skip-if-not-supporting-dart-version to support N-1 and N-2 testing in core-packages.

Updates some cases where 'flutter' was used unconditionally, now that we
need to support a repository without Flutter installed.

Removes some outdated comments and plumbing for forcing `flutter pub`
over `dart pub`, as the reason we used to do it no longer applies now
that `dart pub` also fetches examples by default.
@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label May 27, 2026
Copy link
Copy Markdown

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

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 tooling to use either flutter or dart for pub commands (including analyze, publish, and publish-check) depending on whether the package requires Flutter. It also removes the alwaysUseFlutter parameter from runPubGet and updates the corresponding tests. The reviewer suggested using _dartBinaryPath instead of the hardcoded 'dart' executable in AnalyzeCommand to respect the custom SDK path specified via the --analysis-sdk option.

Comment thread script/tool/lib/src/analyze_command.dart Outdated
@github-actions github-actions Bot removed the CICD Run CI/CD label May 27, 2026
@stuartmorgan-g stuartmorgan-g added the CICD Run CI/CD label May 27, 2026
@github-actions github-actions Bot removed the CICD Run CI/CD label May 27, 2026
@stuartmorgan-g stuartmorgan-g added the CICD Run CI/CD label May 27, 2026
@github-actions github-actions Bot removed the CICD Run CI/CD label May 27, 2026
@stuartmorgan-g
Copy link
Copy Markdown
Collaborator Author

/gemini review

Copy link
Copy Markdown

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

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 tooling to support non-Flutter-based repositories. It ensures that pub commands use either flutter or dart depending on whether the package requires Flutter for analysis and publishing. Additionally, it introduces the --skip-if-not-supporting-dart-version option to allow skipping packages based on Dart version constraints rather than Flutter versions. Relevant tests have been updated and added to verify these behaviors. I have no feedback to provide as there are no review comments.

@stuartmorgan-g stuartmorgan-g added the CICD Run CI/CD label May 27, 2026
Copy link
Copy Markdown
Contributor

@chunhtai chunhtai left a comment

Choose a reason for hiding this comment

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

mostly looks good, just some suggestion that we should probably refactor some common logic out since they are used in multiple places

Comment thread script/tool/lib/src/common/pub_utils.dart Outdated
Comment thread script/tool/lib/src/analyze_command.dart
Comment thread script/tool/lib/src/publish_check_command.dart Outdated
Comment thread script/tool/lib/src/publish_command.dart Outdated
Comment thread script/tool/lib/src/common/pub_utils.dart
@stuartmorgan-g stuartmorgan-g added CICD Run CI/CD and removed CICD Run CI/CD labels May 28, 2026
@stuartmorgan-g stuartmorgan-g requested a review from chunhtai May 28, 2026 15:07
@github-actions github-actions Bot removed the CICD Run CI/CD label May 28, 2026
@stuartmorgan-g stuartmorgan-g added the CICD Run CI/CD label May 28, 2026
Copy link
Copy Markdown
Contributor

@chunhtai chunhtai left a comment

Choose a reason for hiding this comment

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

LGTM

@stuartmorgan-g stuartmorgan-g added the autosubmit Merge PR when tree becomes green via auto submit App label May 28, 2026
@auto-submit auto-submit Bot merged commit 81b5b2f into flutter:main May 28, 2026
87 checks passed
@stuartmorgan-g stuartmorgan-g deleted the tool-reduce-flutter-requirement branch May 28, 2026 18:25
pull Bot pushed a commit to Superoldman96/flutter that referenced this pull request May 29, 2026
…r#187306)

flutter/packages@10cbdc5...e930ced

2026-05-28 23180853+jeffkwoh@users.noreply.github.com
[vector_graphics_compiler]: Fix Stack Overflow and CPU/Memory DoS on
SVGs with circular references or exponential expansions
(flutter/packages#11740)
2026-05-28 stuartmorgan@google.com [tool] Make more commands work
without Flutter (flutter/packages#11797)
2026-05-28 engine-flutter-autoroll@skia.org Roll Flutter from
c8f2f16 to e70534d (18 revisions) (flutter/packages#11799)

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants