Repository navigation
[beta] [flutter_tools] Stop deletion progress status during flutter clean - #193110
auto-submit[bot] merged 17 commits into
Conversation
…0859) Updates the engine.version file from `None (New File)` to `8b25e9697edda8ca0e490c82c73e70ab40630627`.
…894da41a4b798c7539ad391c44 (flutter#191304) This PR updates the transitive dependencies in the engine `DEPS` file based on Dart SDK hash `1c1b2ace74221b894da41a4b798c7539ad391c44`.
…1365) Updates the engine.version file from `8b25e9697edda8ca0e490c82c73e70ab40630627` to `c890f62b2e7a1cd1a9591d5587d619237dfe8b3b`.
This pull request is created by [automatic cherry pick workflow](https://github.com/flutter/flutter/blob/main/docs/releases/Flutter-Cherrypick-Process.md#automatically-creates-a-cherry-pick-request) Please fill in the form below, and a flutter domain expert will evaluate this cherry pick request. ### Issue Link: What is the link to the issue this cherry-pick is addressing? flutter#188265 ### Impact Description: What is the impact (ex. visual jank on Samsung phones, app crash, cannot ship an iOS app)? Does it impact development (ex. flutter doctor crashes when Android Studio is installed), or the shipping of production apps (the app crashes on launch). This information is for domain experts and release engineers to understand the consequences of saying yes or no to the cherry pick. iOS or macOS builds may fail when Swift Package Manager is enabled. ### Changelog Description: Explain this cherry pick: * In one line that is accessible to most Flutter developers. * That describes the state prior to the fix. * That includes which platforms are impacted. See [best practices](https://github.com/flutter/flutter/blob/main/docs/releases/Hotfix-Documentation-Best-Practices.md) for examples. < Replace with changelog description here > [flutter/188265] When building for iOS or macOS with Swift Package Manager enabled, swift package dependencies may fail to resolve due to no version matching requirements. ### Workaround: Is there a workaround for this issue? Disable SwiftPM: `flutter config --no-enable-swift-package-manager` ### Risk: What is the risk level of this cherry-pick? ### Test Coverage: Are you confident that your fix is well-tested by automated tests? ### Validation Steps: What are the steps to validate that this fix works? The error is not reproducible so the fix is speculative.
…pre-action (flutter#191585) This pull request is created by [automatic cherry pick workflow](https://github.com/flutter/flutter/blob/main/docs/releases/Flutter-Cherrypick-Process.md#automatically-creates-a-cherry-pick-request) Please fill in the form below, and a flutter domain expert will evaluate this cherry pick request. ### Issue Link: What is the link to the issue this cherry-pick is addressing? flutter#190846 ### Impact Description: What is the impact (ex. visual jank on Samsung phones, app crash, cannot ship an iOS app)? Does it impact development (ex. flutter doctor crashes when Android Studio is installed), or the shipping of production apps (the app crashes on launch). This information is for domain experts and release engineers to understand the consequences of saying yes or no to the cherry pick. When integrating Flutter into a native iOS app (add-to-app) using SwiftPM, the build may fail due to ### Changelog Description: Explain this cherry pick: * In one line that is accessible to most Flutter developers. * That describes the state prior to the fix. * That includes which platforms are impacted. See [best practices](https://github.com/flutter/flutter/blob/main/docs/releases/Hotfix-Documentation-Best-Practices.md) for examples. < Replace with changelog description here > [flutter/190846] When building an existing native iOS app that's integrated with Flutter using SwiftPM on Xcode 27, it may fail to build Flutter's swift packages. ### Workaround: Is there a workaround for this issue? No ### Risk: What is the risk level of this cherry-pick? ### Test Coverage: Are you confident that your fix is well-tested by automated tests? ### Validation Steps: What are the steps to validate that this fix works? Run packages/flutter_tools/test/integration.shard/swift_package_manager_add2app_test.dart with Xcode 27
This pull request is created by [automatic cherry pick workflow](https://github.com/flutter/flutter/blob/main/docs/releases/Flutter-Cherrypick-Process.md#automatically-creates-a-cherry-pick-request) Please fill in the form below, and a flutter domain expert will evaluate this cherry pick request. ### Issue Link: What is the link to the issue this cherry-pick is addressing? flutter#190987 ### Impact Description: What is the impact (ex. visual jank on Samsung phones, app crash, cannot ship an iOS app)? Does it impact development (ex. flutter doctor crashes when Android Studio is installed), or the shipping of production apps (the app crashes on launch). This information is for domain experts and release engineers to understand the consequences of saying yes or no to the cherry pick. This updates libpng. ### Changelog Description: Explain this cherry pick: * In one line that is accessible to most Flutter developers. * That describes the state prior to the fix. * That includes which platforms are impacted. See [best practices](https://github.com/flutter/flutter/blob/main/docs/releases/Hotfix-Documentation-Best-Practices.md) for examples. < Replace with changelog description here > [flutter/190987] Updates libpng. ### Workaround: Is there a workaround for this issue? No. ### Risk: What is the risk level of this cherry-pick? ### Test Coverage: Are you confident that your fix is well-tested by automated tests? ### Validation Steps: What are the steps to validate that this fix works? Use Flutter with a PNG asset.
…sMigration (flutter#191531) This pull request is created by [automatic cherry pick workflow](https://github.com/flutter/flutter/blob/main/docs/releases/Flutter-Cherrypick-Process.md#automatically-creates-a-cherry-pick-request) Please fill in the form below, and a flutter domain expert will evaluate this cherry pick request. ### Issue Link: flutter#191056 ### Impact Description: `AnalysisOptionsMigration` ignored `include:` directives in `analysis_options.yaml` files, causing `flutter pub get` and build commands to repeatedly rewrite `analysis_options.yaml` files that already inherited the required analyzer `exclude:` patterns (such as `build/**`, `android/**`, `ios/**`) via relative or `package:` includes. ### Changelog Description: [flutter/191056] Recursively resolve includes in AnalysisOptionsMigration to prevent redundant rewrites of analysis_options.yaml. ### Workaround: Explicitly duplicate exclude patterns in the top-level `analysis_options.yaml` file instead of relying on included configs. ### Risk: What is the risk level of this cherry-pick? ### Test Coverage: Are you confident that your fix is well-tested by automated tests? ### Validation Steps: 1. Create a Flutter project whose `analysis_options.yaml` includes another options file defining platform exclusions. 2. Run `flutter pub get`. 3. Confirm that `analysis_options.yaml` is not unnecessarily modified. 4. Run `packages/flutter_tools/test/general.shard/analysis_options_migration_test.dart`.
…sis_options.yaml (flutter#191624) This pull request is created by [automatic cherry pick workflow](https://github.com/flutter/flutter/blob/main/docs/releases/Flutter-Cherrypick-Process.md#automatically-creates-a-cherry-pick-request) Please fill in the form below, and a flutter domain expert will evaluate this cherry pick request. ### Issue Link: flutter#191131 ### Impact Description: `AnalysisOptionsMigration` writes a fixed seven-entry `exclude` list (`android/**`, `ios/**`, `web/**`, `windows/**`, `macos/**`, `linux/**`, `build/**`) into `analysis_options.yaml` on every `flutter pub get` / `analyze` / `run` / `build`, regardless of which directories the project actually contains. A Dart-only package (e.g. `dart create -t web`) that uses `web/` as a source directory gets it silently excluded from analysis the first time any Flutter command touches the package, and there is no opt-out — the entries are restored on every command. ### Changelog Description: [flutter/191131] Only exclude platform directories that actually exist, so `web/**` sources in Dart web packages are no longer silently dropped from analysis. ### Workaround: None — every Flutter command that reaches `ensureReadyForPlatformSpecificTooling` restores the full exclude list; the only way to keep the entries out is to not run Flutter tooling in the package. ### Risk: What is the risk level of this cherry-pick? ### Test Coverage: Are you confident that your fix is well-tested by automated tests? ### Validation Steps: 1. `dart create -t web repro && cd repro && flutter pub get` — confirm `web/**` is not added to the `exclude` list and `dart analyze` still reports errors in `web/main.dart`. 2. `flutter create --platforms=android,ios app` — confirm `analysis_options.yaml` only excludes `build/**`, `android/**`, and `ios/**`. 3. Run `packages/flutter_tools/test/general.shard/migrations/analysis_options_migration_test.dart` and `packages/flutter_tools/test/commands.shard/permeable/create_test.dart`.
…1813) Updates the engine.version file from `c890f62b2e7a1cd1a9591d5587d619237dfe8b3b` to `3816f7b7a3d4c665ccf850087f39e5e931069752`.
This pull request is created by [automatic cherry pick workflow](https://github.com/flutter/flutter/blob/main/docs/releases/Flutter-Cherrypick-Process.md#automatically-creates-a-cherry-pick-request) Please fill in the form below, and a flutter domain expert will evaluate this cherry pick request. ### Issue Link: What is the link to the issue this cherry-pick is addressing? - flutter#181315 - flutter#191457 - flutter#191351 ### Impact Description: What is the impact (ex. visual jank on Samsung phones, app crash, cannot ship an iOS app)? Does it impact development (ex. flutter doctor crashes when Android Studio is installed), or the shipping of production apps (the app crashes on launch). This information is for domain experts and release engineers to understand the consequences of saying yes or no to the cherry pick. There are a slew of oddities associated with this GPU, graphical glitches and suboptimal performance. ### Changelog Description: Explain this cherry pick: * In one line that is accessible to most Flutter developers. * That describes the state prior to the fix. * That includes which platforms are impacted. See [best practices](https://github.com/flutter/flutter/blob/main/docs/releases/Hotfix-Documentation-Best-Practices.md) for examples. [flutter/181315] When using Impeller on Android devices with B-Series PowerVR GPUs, visual oddities and performance drops can be experienced. ### Workaround: Is there a workaround for this issue? No. ### Risk: What is the risk level of this cherry-pick? ### Test Coverage: Are you confident that your fix is well-tested by automated tests? ### Validation Steps: What are the steps to validate that this fix works? This just reverts us to a preexisting state and sends these devices down a well known path.
…2123) Updates the engine.version file from `3816f7b7a3d4c665ccf850087f39e5e931069752` to `e2149387c63888c6a51c8c3569dacda1c1532653`.
…er#192132) This pull request is created by [automatic cherry pick workflow](https://github.com/flutter/flutter/blob/main/docs/releases/Flutter-Cherrypick-Process.md#automatically-creates-a-cherry-pick-request) Please fill in the form below, and a flutter domain expert will evaluate this cherry pick request. ### Issue Link: flutter#191487 ### Impact Description: Android SDK Command-line Tools 23.0 deprecated `sdkmanager --licenses` in favor of the new `android` CLI. When invoked, `sdkmanager --licenses` now only outputs a deprecation notice (`Warning: The --licenses option is no longer needed.`) rather than the parseable license summary `flutter doctor` previously depended on. As a result, `flutter doctor` fails to parse license status and reports `✗ Android license status unknown.` while prompting users to run `flutter doctor --android-licenses`, which fails to resolve the issue. ### Changelog Description: [flutter/191487] When using Android SDK Command-line Tools 23.0+ for Android, flutter doctor incorrectly reports "Android license status unknown". ### Workaround: 1. Downgrade Android SDK Command-line Tools to version 22.0 via the Android Studio SDK Manager or CLI. 2. If licenses have already been accepted on disk in `<Android-SDK>/licenses/`, Android Gradle builds still succeed and the `flutter doctor` warning can be safely ignored (if the user knows to ignore). ### Risk: What is the risk level of this cherry-pick? ### Test Coverage: Are you confident that your fix is well-tested by automated tests? ### Validation Steps: 1. Ensure Android SDK Command-line Tools 23.0 is installed (verify in `$ANDROID_HOME/cmdline-tools/latest/source.properties` that `Pkg.Revision=23.0`). 2. Run `flutter doctor -v`. 3. Verify that under `Android toolchain`, it reports `• All Android licenses accepted.` instead of `✗ Android license status unknown.` 4. (Optional negative check) Temporarily rename the `$ANDROID_HOME/licenses` directory, run `flutter doctor -v`, and verify it reports `Android licenses not accepted`. Restore the directory.
…ter#192507) This pull request is created by [automatic cherry pick workflow](https://github.com/flutter/flutter/blob/main/docs/releases/Flutter-Cherrypick-Process.md#automatically-creates-a-cherry-pick-request) Please fill in the form below, and a flutter domain expert will evaluate this cherry pick request. ### Issue Link: What is the link to the issue this cherry-pick is addressing? dart-lang/native#3594 ### Impact Description: What is the impact (ex. visual jank on Samsung phones, app crash, cannot ship an iOS app)? Does it impact development (ex. flutter doctor crashes when Android Studio is installed), or the shipping of production apps (the app crashes on launch). This information is for domain experts and release engineers to understand the consequences of saying yes or no to the cherry pick. Developers cannot submit iOS apps to App Store Connect / TestFlight when using native assets compiled with -mios-version-min >= 14 (such as libraries using C++20). This impacts shipping production apps. Apple rejects the uploaded IPA with error ITMS-90208: Invalid Bundle because flutter_tools generates a framework Info.plist with MinimumOSVersion = 13.0, conflicting with the binary's higher OS requirement. ### Changelog Description: Explain this cherry pick: * In one line that is accessible to most Flutter developers. * That describes the state prior to the fix. * That includes which platforms are impacted. See [best practices](https://github.com/flutter/flutter/blob/main/docs/releases/Hotfix-Documentation-Best-Practices.md) for examples. [flutter/191964](flutter#191964): On iOS, apps bundling native assets fail App Store submission when native libraries are compiled with deployment targets above iOS 13. ### Workaround: Is there a workaround for this issue? Manually edit Info.plist inside Runner.app/Frameworks/<name>.framework/Info.plist in the built archive to set MinimumOSVersion to 15.0, and re-sign the framework and app before uploading to App Store Connect ### Risk: What is the risk level of this cherry-pick? ### Test Coverage: Are you confident that your fix is well-tested by automated tests? ### Validation Steps: What are the steps to validate that this fix works? 1) Build an iOS app with native assets: flutter build ios --release --no-codesign. 2) Check the framework Info.plist ``` plutil -p build/ios/iphoneos/Runner.app/Frameworks/*.framework/Info.plist | grep MinimumOSVersion ``` 3)Confirm it reads "15.0" instead of "13.0"
) ### Issue Link: What is the link to the issue this cherry-pick is addressing? flutter#190307 ### Impact Description: What is the impact (ex. visual jank on Samsung phones, app crash, cannot ship an iOS app)? Does it impact development (ex. flutter doctor crashes when Android Studio is installed), or the shipping of production apps (the app crashes on launch). This information is for domain experts and release engineers to understand the consequences of saying yes or no to the cherry pick. Debugging on iOS 27+ occasionally crashes. ### Changelog Description: Explain this cherry pick: * In one line that is accessible to most Flutter developers. * That describes the state prior to the fix. * That includes which platforms are impacted. See [best practices](https://github.com/flutter/flutter/blob/main/docs/releases/Hotfix-Documentation-Best-Practices.md) for examples. < Replace with changelog description here > [flutter/190307] When debugging on physical iOS 27 devices, app occasionally crashes. ### Workaround: Is there a workaround for this issue? No ### Risk: What is the risk level of this cherry-pick? ### Test Coverage: Are you confident that your fix is well-tested by automated tests? ### Validation Steps: What are the steps to validate that this fix works? Use example code a script to reproduce from flutter#190307
…lutter#192996) Ensure `deletionStatus.stop()` is always called in a `finally` block around `file.deleteSync(recursive: true)` in `CleanCommand._deleteFile`. Previously, `deletionStatus.stop()` was only called inside the `on FileSystemException catch` block, leaving `StdoutLogger._status` active on successful file deletions. Because `StdoutLogger.startProgress` ignores new statuses when `_status != null` and only emits the trailing newline in `stop()` / `cancel()`, the first `Deleting ...` progress status remained unstopped, suppressing all subsequent deletion progress statuses and omitting the trailing newline on exit. Adds a regression test in `packages/flutter_tools/test/commands.shard/hermetic/clean_test.dart` verifying that `flutter clean` stops each deletion progress status and logs every deleted directory. Fixes flutter#192531 - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [AI contribution guidelines] and understand my responsibilities, or I am not using AI tools. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant in-code documentation (doc comments with `///`). - [x] If this PR introduces a new feature or capability, I created and linked a website documentation issue or PR in [flutter/website] (or verified none is needed). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview [AI contribution guidelines]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#ai-contribution-guidelines [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [flutter/website]: https://github.com/flutter/website [breaking change policy]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
|
This pull request was opened from and to a release candidate branch. This should only be done as part of the official Flutter release process. If you are attempting to make a regular contribution to the Flutter project, please close this PR and follow the instructions at Tree Hygiene for detailed instructions on contributing to Flutter. Reviewers: Use caution before merging pull requests to release branches. Ensure the proper procedure has been followed. |
There was a problem hiding this comment.
Code Review
This pull request refactors CleanCommand to ensure deletionStatus.stop() is executed within a finally block, and adds a test to verify that progress status is stopped for each deleted directory. The feedback recommends using the endsWith matcher in the test instead of asserting isTrue on a string method call to improve failure message clarity.
fafcafc
into
flutter:flutter-3.49-candidate.0
This pull request is created by automatic cherry pick workflow
Please fill in the form below, and a flutter domain expert will evaluate this cherry pick request.
Issue Link:
#192531
Impact Description:
Running
flutter cleanleaves the firstDeleting ...terminal spinner/status active afterbuild/is deleted becausedeletionStatus.stop()is only called in theFileSystemExceptioncatch block instead of afinallyblock. BecauseStdoutLogger.startProgressignores new progress statuses while an existing status is active and only emits a trailing newline when stopped, subsequent deletion statuses (.dart_tool/,ephemeral/, etc.) are suppressed and the terminal cursor is left mid-line on exit, makingflutter cleanappear to freeze or break off mid-execution.(Cherry-pick note: Rebased/merged onto
flutter-3.49-candidate.0. Becauseflutter-3.49-candidate.0already includes the modular dependency injection migration forCleanCommand(#190742), bothpackages/flutter_tools/lib/src/commands/clean.dartandpackages/flutter_tools/test/commands.shard/hermetic/clean_test.dartmatch upstream #192996 (f960c3ae208) byte-for-byte.)Changelog Description:
[flutter/192531] When running
flutter cleanon all platforms, the deletion progress spinner no longer hangs after deleting the first directory and all cleaned directories are properly reported.Workaround:
None for the broken terminal progress output, though
flutter cleanstill deletes the directories in the background.Risk:
What is the risk level of this cherry-pick?
Test Coverage:
Are you confident that your fix is well-tested by automated tests?
Validation Steps:
build/and.dart_tool/exist.flutter cleanin an interactive terminal.Deleting ...progress status completes with an elapsed time and a trailing newline is emitted when the command finishes.