Repository navigation
Print the Intel Mac deprecation warning on every command - #194071
auto-submit[bot] merged 5 commits into
Conversation
There was a problem hiding this comment.
Code Review
This pull request removes the persistent state tracking for the Intel Mac deprecation warning, making the warning display on every command execution on Intel-based Macs and ensuring it is non-fatal. The tests are updated to reflect these changes. A review comment points out a syntax error in the test file where the HostPlatform prefix is missing.
| overrides: <Type, Generator>{ | ||
| FileSystem: () => fileSystem, | ||
| ProcessManager: () => processManager, | ||
| OperatingSystemUtils: () => FakeOperatingSystemUtils(hostPlatform: .darwin_x64), |
There was a problem hiding this comment.
There is a typo here: .darwin_x64 is missing the HostPlatform prefix. This will cause a compilation error in Dart since Dart does not support leading dot shorthand for enum values.
| OperatingSystemUtils: () => FakeOperatingSystemUtils(hostPlatform: .darwin_x64), | |
| OperatingSystemUtils: () => FakeOperatingSystemUtils(hostPlatform: HostPlatform.darwin_x64), |
bkonyi
left a comment
There was a problem hiding this comment.
Thanks for the contribution! Overall this looks good, just a couple of small comments around migrating the tests to testWithoutContext and using a dot shorthand. Also, you can ignore the gemini-code-assist comment on .darwin_x64 as dot shorthands are valid in Dart 3.10+.
It also looks like there's some merge conflicts that need to be fixed before this lands.
(Review assisted by an AI coding agent)
| final PersistentToolState? persistentToolState = _persistentToolState; | ||
| if (_os.hostPlatform == HostPlatform.darwin_x64 && | ||
| (persistentToolState?.shouldShowIntelMacWarning ?? true)) { | ||
| if (_os.hostPlatform == HostPlatform.darwin_x64) { |
There was a problem hiding this comment.
Nit: can use dot shorthand here (_os.hostPlatform == .darwin_x64).
There was a problem hiding this comment.
done, switched it to .darwin_x64 👍
|
|
||
| testUsingContext( | ||
| 'prints Intel Mac warning on macOS X64 once', | ||
| 'prints Intel Mac warning on macOS X64 on every command', |
There was a problem hiding this comment.
Do we need testUsingContext here and for the other Intel Mac warning tests? We can pass FakeToolContext to DummyFlutterCommand and use testWithoutContext instead:
testWithoutContext('prints Intel Mac warning on macOS X64 on every command', () async {
final flutterCommand = DummyFlutterCommand(
noUsagePath: true,
toolContext: FakeToolContext(
fs: fileSystem,
logger: logger,
os: FakeOperatingSystemUtils(hostPlatform: .darwin_x64),
processManager: processManager,
),
);There was a problem hiding this comment.
good call, moved all three Intel Mac tests (the arm64 one too) to testWithoutContext with FakeToolContext like you suggested. also rebased on master so the conflicts are gone
The warning in FlutterCommand.verifyThenRunCommand was gated on PersistentToolState.shouldShowIntelMacWarning, so it only printed once per user. Drop the gate along with the persistent state that only existed to back it, and update the existing test to expect the warning on every run. Since the warning now shows up on every command, print it with fatal: false so an Intel host alone does not fail commands that treat warnings as fatal. Fixes flutter#193729
Pass a FakeToolContext to DummyFlutterCommand instead of overriding globals through testUsingContext, and use a dot shorthand for the darwin_x64 check.
0330f9f to
01c3e21
Compare
VerboseLogger ignored the fatal argument, so in verbose mode a non-fatal warning still set hadWarningOutput and failed --fatal-warnings runs. It also forwarded every warning to its parent logger with the default fatal: true, which set the shared flag again. Use hadWarningOutput || fatal like StdoutLogger and BufferLogger, and pass fatal through _emit to the parent logger.
Roll Flutter from b75c5b30406a to 06f1c24345a2 (37 revisions) flutter/flutter@b75c5b3...06f1c24 2026-11-25 [email protected] Roll Skia from a60d883b3fe3 to e84ecd98d9f2 (2 revisions) (flutter/flutter#197375) 2026-11-25 [email protected] Roll Skia from ca229e319550 to a60d883b3fe3 (4 revisions) (flutter/flutter#197371) 2026-11-25 [email protected] Roll Skia from 6f75212e5a23 to ca229e319550 (2 revisions) (flutter/flutter#197369) 2026-11-25 [email protected] Roll Skia from 75d95595f14e to 6f75212e5a23 (1 revision) (flutter/flutter#197364) 2026-11-25 [email protected] [Windows] Fix Korean 3-beolsik IME dropping space, digits and punctuation (flutter/flutter#194270) 2026-11-25 [email protected] [flutter_tools] Strip embedded credentials from repository URLs (flutter/flutter#197219) 2026-11-25 [email protected] [flutter_tools] Add structured extension.log notifications for tool extensions (flutter/flutter#196714) 2026-11-25 [email protected] [flutter_tools] Share Depfile in flutter_tools_core and make BuildTarget.targetPlatform optional (flutter/flutter#194965) 2026-11-25 [email protected] Reply null asynchronously to ignored web platform messages and unskip missing-asset tests (flutter/flutter#197267) 2026-11-25 [email protected] Roll Dart SDK from 87f515c52de9 to 5202130a51b8 (1 revision) (flutter/flutter#197363) 2026-11-25 [email protected] [web] Retain queued scene pictures via ContainerLayer render pinning (flutter/flutter#196748) 2026-11-25 [email protected] [flutter_tools] Include dependency manifests in copyAssets depfile (flutter/flutter#196596) 2026-11-25 [email protected] Print the Intel Mac deprecation warning on every command (flutter/flutter#194071) 2026-11-25 [email protected] Roll Skia from 243c0dc9f662 to 75d95595f14e (2 revisions) (flutter/flutter#197351) 2026-11-25 [email protected] iOS: Ignore platform messages after the engine is destroyed (flutter/flutter#197310) 2026-11-24 [email protected] Bump customer tests to pick up material_ui cache extent test updates (flutter/flutter#197266) 2026-11-24 [email protected] [flutter_tools] Use refreshed FlutterVersion for flutter doctor feature flags (flutter/flutter#196944) 2026-11-24 [email protected] [flutter_tools] Do not crash if buildXcodeProject temporary directory is deleted before cleanup (flutter/flutter#195918) 2026-11-24 [email protected] Fix some `parameter_assignments` warnings (flutter/flutter#196815) 2026-11-24 [email protected] [flutter_tools] Extract PlatformDebuggingOptions and move WebDebugConfig (flutter/flutter#197229) 2026-11-24 [email protected] Fix desktop apps installing to the system prefix after a failed build (flutter/flutter#196482) 2026-11-24 [email protected] [flutter_tools] Write flutter test native_assets.json outside targetDir (flutter/flutter#196300) 2026-11-24 [email protected] iOS: Check the presented composition order in platform view tests (flutter/flutter#197302) 2026-11-24 [email protected] Run the shared Vulkan embedder tests under Impeller as well as Skia (flutter/flutter#193004) 2026-11-24 [email protected] Roll Fuchsia Linux SDK from BOgXtIYxLYcCkRou2... to HtAKfFLbfAQ6g96RY... (flutter/flutter#197334) 2026-11-24 [email protected] Roll Skia from b3dec9325fe1 to 243c0dc9f662 (6 revisions) (flutter/flutter#197333) 2026-11-24 [email protected] [flutter_tools] Delete globals.dart and context_runner.dart (flutter/flutter#196095) 2026-11-24 [email protected] Update viewInsets docs for translucent and rounded system UI (flutter/flutter#196355) 2026-11-24 [email protected] [flutter_tools] Check that dartaotruntime can run before starting the frontend server (flutter/flutter#194206) 2026-11-24 [email protected] [framework] Fix DraggableScrollableSheet '_hold == null' assertion when touch lifts during snap (flutter/flutter#195771) 2026-11-24 [email protected] [web] Release ImageSource on GC and fix Picture finalizer cycles (flutter/flutter#197245) 2026-11-24 [email protected] [flutter_tools] Fix web compiler output tracking in web builds (flutter/flutter#196563) 2026-11-24 [email protected] Upgrade CI to Xcode 27.2 (flutter/flutter#196807) 2026-11-24 [email protected] Roll Packages from 5b93485 to f455dfa (6 revisions) (flutter/flutter#197316) 2026-11-24 [email protected] [Linux] Fix deadlock presenting to a Wayland subsurface (flutter/flutter#196945) 2026-11-24 [email protected] Roll Skia from 2140958ee284 to b3dec9325fe1 (1 revision) (flutter/flutter#197309) 2026-11-24 [email protected] Roll Fuchsia Test Scripts from oEU515sDqSTvD8Spx... to GPtykFNizlaauBqzs... (flutter/flutter#197313) 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 Please CC [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 ...
The Intel Mac deprecation warning added in #188835 is gated on
PersistentToolState.shouldShowIntelMacWarninginFlutterCommand.verifyThenRunCommand, and the first command that prints it sets that flag to false in the tool's persistent state. So each user sees the warning once and then never again, which is easy to miss for a deprecation that is still coming.This removes the gate, so the warning is printed on every command on an Intel (
darwin_x64) host. The message and the host check are unchanged, so Apple Silicon hosts still print nothing.Printing it every time also means it would trip the
fatal-warningsflag on everybuild,runandteston an Intel host instead of only the first one.runFlutterTestindev/bots/utils.dartpasses that flag by default and theMac_x64builders still run on beta and stable, so the warning is now printed withfatal: false, same as theFLUTTER_STORAGE_BASE_URLwarning incache.dart. It's about the host machine rather than the project, so it shouldn't fail a command by itself.With the gate gone,
shouldShowIntelMacWarningand itsdisplayed-intel-warning-messagekey inPersistentToolStatehave no readers or writers left, and neither do the private_persistentToolStategetter and thepersistent_tool_state.dartimport influtter_command.dart, so they're removed instead of being kept around as dead state._DefaultPersistentToolStateis the only implementation of the interface. Adisplayed-intel-warning-messageentry that is already in someone's tool state file is simply never read again.The existing
prints Intel Mac warning on macOS X64 oncetest already ran the command twice and checked that the second run stayed quiet. It's nowprints Intel Mac warning on macOS X64 on every commandand checks that the warning shows up twice. The newIntel Mac warning on macOS X64 is not fataltest checks that the warning doesn't sethadWarningOutput, which is whatcheckForFatalLogsreads.does not print Intel Mac warning on macOS ARM64is unchanged. Locallyflutter_command_test.dart(92/92) andpersistent_tool_state_test.dart(2/2) pass, and both Intel tests fail with the twolib/files reverted.Fixes #193729
Pre-launch Checklist
///).