Skip to content

Conversation

@matanlurey
Copy link
Contributor

Fixes #145158.

In an ideal world, the --machine flag would be strictly a global flag which sub-commands can choose to use (or perhaps just to report a toolExit that they don't have a --machine supported-mode if not. However currently, there is both a global flag, and command-specific flags.

This leads to the confusing scenario where:

flutter devices --machine

... still checks for a Flutter update, printing a banner and breaking the JSON output.

This PR "fixes" that by allowing --machine anywhere in the command-line arguments to suppress the check.

/cc @johnmccutchan.

@matanlurey matanlurey requested a review from andrewkolos June 12, 2024 22:23
@github-actions github-actions bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Jun 12, 2024
Copy link
Contributor

@andrewkolos andrewkolos left a comment

Choose a reason for hiding this comment

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

LGTM with uber-nits

return super.run(args);
}

/// Whether to perform a flutter version check, which prints a warning if old.
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Should a function's doc string explain (and thus be coupled to) what the caller(s) plan to do with it? (Not a big deal here since this comment is unlikely to become incorrect)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Update packages/flutter_tools/lib/src/runner/flutter_command_runner.dart

Co-authored-by: Andrew Kolos <[email protected]>

++
@matanlurey matanlurey force-pushed the suppress-flutter-update-further branch from 272570b to 0250bae Compare June 13, 2024 17:08
@matanlurey matanlurey added the autosubmit Merge PR when tree becomes green via auto submit App label Jun 13, 2024
@auto-submit
Copy link
Contributor

auto-submit bot commented Jun 13, 2024

auto label is removed for flutter/flutter/150138, due to - The status or check suite Mac tool_tests_general has failed. Please fix the issues identified (or deflake) before re-applying this label.

@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jun 13, 2024
@matanlurey matanlurey added the autosubmit Merge PR when tree becomes green via auto submit App label Jun 13, 2024
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jun 13, 2024
@auto-submit
Copy link
Contributor

auto-submit bot commented Jun 13, 2024

auto label is removed for flutter/flutter/150138, due to - The status or check suite Linux analyze has failed. Please fix the issues identified (or deflake) before re-applying this label.

@matanlurey matanlurey added the autosubmit Merge PR when tree becomes green via auto submit App label Jun 13, 2024
@auto-submit
Copy link
Contributor

auto-submit bot commented Jun 13, 2024

auto label is removed for flutter/flutter/150138, due to - The status or check suite Google testing has failed. Please fix the issues identified (or deflake) before re-applying this label.

@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jun 13, 2024
@andrewkolos andrewkolos added the autosubmit Merge PR when tree becomes green via auto submit App label Jun 13, 2024
@auto-submit auto-submit bot merged commit 0cc27b9 into flutter:master Jun 13, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 14, 2024
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Jun 14, 2024
flutter/flutter@01db23b...349ec71

2024-06-14 [email protected] Add tests for navigator.0.dart (flutter/flutter#150034)
2024-06-14 [email protected] Switch to `Iterable.cast` instance method (flutter/flutter#150185)
2024-06-14 [email protected] Include transform in static Gradient lerp methods (flutter/flutter#149624)
2024-06-14 [email protected] Validate the `contrastLevel` during `ColorScheme` creation (flutter/flutter#150176)
2024-06-14 49699333+dependabot[bot]@users.noreply.github.com Bump github/codeql-action from 3.25.9 to 3.25.10 (flutter/flutter#150228)
2024-06-13 [email protected] Fix leaky test. (flutter/flutter#150235)
2024-06-13 [email protected] Document CIPD role & login for upgrading Android engine (flutter/flutter#149433)
2024-06-13 [email protected] Update doc for `ColorScheme.surface` (flutter/flutter#150212)
2024-06-13 [email protected] Roll pub packages (flutter/flutter#150206)
2024-06-13 [email protected] Bump new release for a11y_assessment (flutter/flutter#150213)
2024-06-13 [email protected] Use --(no-)strip-wams instead of --(no-)-name-section in `dart compile wasm` (flutter/flutter#149641)
2024-06-13 [email protected] Reland "Identify and re-throw our dependency checking errors in flutter.groovy" (flutter/flutter#150128)
2024-06-13 [email protected] Use --(no-)strip-wams instead of --(no-)-name-section in `dart compile wasm` (flutter/flutter#150180)
2024-06-13 [email protected] Suppress Flutter update check if `--machine` is present at all. (flutter/flutter#150138)
2024-06-13 [email protected] [Reland] Introduce `ChipAnimationStyle` to override default chips animations durations (flutter/flutter#149876)
2024-06-13 [email protected] Update framework and flutter fix flutter.dev/docs links (flutter/flutter#150174)
2024-06-13 [email protected] Roll Flutter Engine from 4cb3025d3abf to 8167dffd1914 (2 revisions) (flutter/flutter#150208)
2024-06-13 [email protected] Replace InputDecorator M3 golden test (flutter/flutter#150111)
2024-06-13 [email protected] Roll Packages from 260102b to 7805455 (2 revisions) (flutter/flutter#150198)

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 [email protected],[email protected],[email protected] 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
victorsanni pushed a commit to victorsanni/flutter that referenced this pull request Jun 14, 2024
…ter#150138)

Fixes flutter#145158.

In an ideal world, the `--machine` flag would be strictly a global flag which sub-commands can choose to use (or perhaps just to report a `toolExit` that they don't have a `--machine` supported-mode if not. However currently, there is both a global flag, and command-specific flags.

This leads to the confusing scenario where:
```sh
flutter devices --machine
```

... still checks for a Flutter update, printing a banner and breaking the JSON output.

This PR "fixes" that by allowing `--machine` _anywhere_ in the command-line arguments to suppress the check.

/cc @johnmccutchan.
victorsanni pushed a commit to victorsanni/flutter that referenced this pull request Jun 14, 2024
…ter#150138)

Fixes flutter#145158.

In an ideal world, the `--machine` flag would be strictly a global flag which sub-commands can choose to use (or perhaps just to report a `toolExit` that they don't have a `--machine` supported-mode if not. However currently, there is both a global flag, and command-specific flags.

This leads to the confusing scenario where:
```sh
flutter devices --machine
```

... still checks for a Flutter update, printing a banner and breaking the JSON output.

This PR "fixes" that by allowing `--machine` _anywhere_ in the command-line arguments to suppress the check.

/cc @johnmccutchan.
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 6, 2024
github-merge-queue bot pushed a commit that referenced this pull request Jul 22, 2025
Was already fixed in #150138, so
removes duplicate flag.

Already tested by existing test suite.
azatech pushed a commit to azatech/flutter that referenced this pull request Jul 28, 2025
Was already fixed in flutter#150138, so
removes duplicate flag.

Already tested by existing test suite.
ksokolovskyi pushed a commit to ksokolovskyi/flutter that referenced this pull request Aug 19, 2025
Was already fixed in flutter#150138, so
removes duplicate flag.

Already tested by existing test suite.
mboetger pushed a commit to mboetger/flutter that referenced this pull request Sep 18, 2025
Was already fixed in flutter#150138, so
removes duplicate flag.

Already tested by existing test suite.
korca0220 pushed a commit to korca0220/flutter that referenced this pull request Sep 22, 2025
Was already fixed in flutter#150138, so
removes duplicate flag.

Already tested by existing test suite.
lucaantonelli pushed a commit to lucaantonelli/flutter that referenced this pull request Nov 21, 2025
Was already fixed in flutter#150138, so
removes duplicate flag.

Already tested by existing test suite.
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 tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

flutter devices --machine prints upgrade banner breaking machine parsing

2 participants