[stable] Print trace when skipping flavor-specific and platform-specific assets#187857
Conversation
flutter#187045) Replaces `printWarning()` with `printTrace()` when skipping an asset based on flavor or platform. The warning is non-actionable, as skipping assets is the expected behaviour. Leave as trace to help in debugging. Fixes flutter#186738 ## Pre-launch Checklist - [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 documentation (doc comments with `///`). - [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.
|
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 changes the logging level from warning to trace when skipping assets due to flavor or platform mismatches in ManifestAssetBundle. Additionally, it updates the asset build system tests to capture and verify these trace logs. I have no feedback to provide.
762a45b
into
flutter:flutter-3.44-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:
#186738
Impact Description:
Starting in Flutter 3.44, building a flavored app (Android/iOS) emits a noisy warning for every single asset file that is skipped because it belongs to a different flavor. For projects with many flavor-specific assets, this floods the build console with hundreds of non-actionable warnings, cluttering the build output and making it harder to see real warnings or errors.
Changelog Description:
[flutter/186738] Demote flavor/platform asset skipping messages from warning to trace level to reduce build log noise.
Workaround:
None, other than ignoring the warnings in the build output.
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:
pubspec.yaml.flutter build apk --flavor <flavor>).-v).