-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Revert "[ios][tools]do not log "bonjour not found" at all (unless verbose)" #173879
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Revert "[ios][tools]do not log "bonjour not found" at all (unless verbose)" #173879
Conversation
…bose) (#…" This reverts commit b581cda.
There was a problem hiding this 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 reverts a previous change that attempted to suppress certain error logs. The revert removes the skipErrorLog parameter and associated logic from runSync in xcode_backend.dart, and simplifies the related tests.
My review has identified a critical issue where an undefined variable is used, which will cause a runtime error. I've also pointed out missing documentation that violates the project's style guide. Please address these points.
| /// Run given command in a synchronous subprocess. | ||
| /// | ||
| /// Will throw [Exception] if the exit code is not 0. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The documentation for the verbose and allowFail parameters is missing. According to the Flutter Style Guide, all public members should have documentation.1
Please add documentation for these parameters to explain their purpose.
/// Run given command in a synchronous subprocess.
///
/// If [verbose] is true, the command being run and its stdout will be printed.
///
/// If [allowFail] is true, an exception will not be thrown even if the process returns a
/// non-zero exit code. Also, `error:` will not be prefixed to the output to prevent Xcode
/// complication failures.
///
/// Will throw [Exception] if the exit code is not 0.
Style Guide References
Footnotes
I think I get it now. For For This is so confusing... I think I will go with the fix 1 in the PR description, since fix 2's call path is a bit convoluted |
jmagman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clean revert LGTM.
@hellohuanlin can you file a new issue or open the old one and document your findings and suggested fixes?
re-opened the old issue. |
flutter/flutter@52af7a5...0a2906b 2025-08-16 [email protected] Improve `SweepGradient` angle and `TileMode` documentation (flutter/flutter#172406) 2025-08-16 [email protected] Roll Skia from 1e148cada9d4 to 16dbd908dcab (1 revision) (flutter/flutter#173901) 2025-08-16 [email protected] Roll Skia from 91ad1f21ca61 to 1e148cada9d4 (3 revisions) (flutter/flutter#173890) 2025-08-16 [email protected] Roll Dart SDK from 9277d6303da5 to 67ca79475db6 (1 revision) (flutter/flutter#173886) 2025-08-15 [email protected] Blocks exynos9820 chip from vulkan (flutter/flutter#173807) 2025-08-15 [email protected] Revert "[ios][tools]do not log "bonjour not found" at all (unless verbose)" (flutter/flutter#173879) 2025-08-15 [email protected] Roll `package:analyzer` forward to `8.1.1` (flutter/flutter#173867) 2025-08-15 [email protected] Roll Skia from 2f66be8a593a to 91ad1f21ca61 (3 revisions) (flutter/flutter#173877) 2025-08-15 [email protected] [a11y] : set isFocused will update isFocusable to true (flutter/flutter#170935) 2025-08-15 [email protected] Reland predictive back route transitions by default (flutter/flutter#173860) 2025-08-15 [email protected] Roll Fuchsia Linux SDK from zWRpLglb48zC1vZLv... to H1kVA85LyQsK8EDp2... (flutter/flutter#173874) 2025-08-15 [email protected] Add onHover callback support for TableRowInkWell (flutter/flutter#173373) 2025-08-15 [email protected] Roll Skia from 5654ac32ede0 to 2f66be8a593a (6 revisions) (flutter/flutter#173866) 2025-08-15 [email protected] Roll Dart SDK from cc008dc8e7aa to 9277d6303da5 (2 revisions) (flutter/flutter#173864) 2025-08-15 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Implements the Android native stretch effect as a fragment shader (Impeller-only). (#169293)" (flutter/flutter#173865) 2025-08-15 [email protected] Re-add `Linux_android_emu *` tests that had KVM issues, now resolved (flutter/flutter#173812) 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] 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
…bose)" (flutter#173879) Reverts flutter#173569 Sorry I have to revert this one as it didn't work. # Why didn't work From the comment, it looks like `echoError` is only used for verbose mode, and `streamOutput` is used for non-verbose mode (I am still looking into how this is setup) https://github.com/flutter/flutter/blob/e4f27cd09734db6c6ed94e104ab5333c48dfc544/packages/flutter_tools/bin/xcode_backend.dart#L151 # How to fix ## Possible Fix 1 I tested this works, by changing this line: https://github.com/flutter/flutter/blob/master/packages/flutter_tools/bin/xcode_backend.dart#L159 into this: ``` if (!verbose && exitCode == 0 && !skipErrorLog) ``` ## Possible fix 2: Surprisingly this also works: ``` if (!verbose && exitCode == 0) { streamOutput(errorOutput.string().replaceAll('error', ''); } ``` Although we made sure `errorOutput` doesn't start with `error:`, there's an `error:` in the middle of the string. Possibly because of this code in `mac.dart`: https://github.com/flutter/flutter/blob/e4f27cd09734db6c6ed94e104ab5333c48dfc544/packages/flutter_tools/lib/src/ios/mac.dart#L431-L433 # Why we missed it? I tested my initial code code and assumed updated code would work, because I incorrectly thought `echoError` was the one triggered the output in non-verbose mode. I should have verified it.
…r#9836) flutter/flutter@52af7a5...0a2906b 2025-08-16 [email protected] Improve `SweepGradient` angle and `TileMode` documentation (flutter/flutter#172406) 2025-08-16 [email protected] Roll Skia from 1e148cada9d4 to 16dbd908dcab (1 revision) (flutter/flutter#173901) 2025-08-16 [email protected] Roll Skia from 91ad1f21ca61 to 1e148cada9d4 (3 revisions) (flutter/flutter#173890) 2025-08-16 [email protected] Roll Dart SDK from 9277d6303da5 to 67ca79475db6 (1 revision) (flutter/flutter#173886) 2025-08-15 [email protected] Blocks exynos9820 chip from vulkan (flutter/flutter#173807) 2025-08-15 [email protected] Revert "[ios][tools]do not log "bonjour not found" at all (unless verbose)" (flutter/flutter#173879) 2025-08-15 [email protected] Roll `package:analyzer` forward to `8.1.1` (flutter/flutter#173867) 2025-08-15 [email protected] Roll Skia from 2f66be8a593a to 91ad1f21ca61 (3 revisions) (flutter/flutter#173877) 2025-08-15 [email protected] [a11y] : set isFocused will update isFocusable to true (flutter/flutter#170935) 2025-08-15 [email protected] Reland predictive back route transitions by default (flutter/flutter#173860) 2025-08-15 [email protected] Roll Fuchsia Linux SDK from zWRpLglb48zC1vZLv... to H1kVA85LyQsK8EDp2... (flutter/flutter#173874) 2025-08-15 [email protected] Add onHover callback support for TableRowInkWell (flutter/flutter#173373) 2025-08-15 [email protected] Roll Skia from 5654ac32ede0 to 2f66be8a593a (6 revisions) (flutter/flutter#173866) 2025-08-15 [email protected] Roll Dart SDK from cc008dc8e7aa to 9277d6303da5 (2 revisions) (flutter/flutter#173864) 2025-08-15 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Implements the Android native stretch effect as a fragment shader (Impeller-only). (#169293)" (flutter/flutter#173865) 2025-08-15 [email protected] Re-add `Linux_android_emu *` tests that had KVM issues, now resolved (flutter/flutter#173812) 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] 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
…bose)" (flutter#173879) Reverts flutter#173569 Sorry I have to revert this one as it didn't work. # Why didn't work From the comment, it looks like `echoError` is only used for verbose mode, and `streamOutput` is used for non-verbose mode (I am still looking into how this is setup) https://github.com/flutter/flutter/blob/e4f27cd09734db6c6ed94e104ab5333c48dfc544/packages/flutter_tools/bin/xcode_backend.dart#L151 # How to fix ## Possible Fix 1 I tested this works, by changing this line: https://github.com/flutter/flutter/blob/master/packages/flutter_tools/bin/xcode_backend.dart#L159 into this: ``` if (!verbose && exitCode == 0 && !skipErrorLog) ``` ## Possible fix 2: Surprisingly this also works: ``` if (!verbose && exitCode == 0) { streamOutput(errorOutput.string().replaceAll('error', ''); } ``` Although we made sure `errorOutput` doesn't start with `error:`, there's an `error:` in the middle of the string. Possibly because of this code in `mac.dart`: https://github.com/flutter/flutter/blob/e4f27cd09734db6c6ed94e104ab5333c48dfc544/packages/flutter_tools/lib/src/ios/mac.dart#L431-L433 # Why we missed it? I tested my initial code code and assumed updated code would work, because I incorrectly thought `echoError` was the one triggered the output in non-verbose mode. I should have verified it.
…bose)" (flutter#173879) Reverts flutter#173569 Sorry I have to revert this one as it didn't work. # Why didn't work From the comment, it looks like `echoError` is only used for verbose mode, and `streamOutput` is used for non-verbose mode (I am still looking into how this is setup) https://github.com/flutter/flutter/blob/e4f27cd09734db6c6ed94e104ab5333c48dfc544/packages/flutter_tools/bin/xcode_backend.dart#L151 # How to fix ## Possible Fix 1 I tested this works, by changing this line: https://github.com/flutter/flutter/blob/master/packages/flutter_tools/bin/xcode_backend.dart#L159 into this: ``` if (!verbose && exitCode == 0 && !skipErrorLog) ``` ## Possible fix 2: Surprisingly this also works: ``` if (!verbose && exitCode == 0) { streamOutput(errorOutput.string().replaceAll('error', ''); } ``` Although we made sure `errorOutput` doesn't start with `error:`, there's an `error:` in the middle of the string. Possibly because of this code in `mac.dart`: https://github.com/flutter/flutter/blob/e4f27cd09734db6c6ed94e104ab5333c48dfc544/packages/flutter_tools/lib/src/ios/mac.dart#L431-L433 # Why we missed it? I tested my initial code code and assumed updated code would work, because I incorrectly thought `echoError` was the one triggered the output in non-verbose mode. I should have verified it.
…bose)" (flutter#173879) Reverts flutter#173569 Sorry I have to revert this one as it didn't work. # Why didn't work From the comment, it looks like `echoError` is only used for verbose mode, and `streamOutput` is used for non-verbose mode (I am still looking into how this is setup) https://github.com/flutter/flutter/blob/e4f27cd09734db6c6ed94e104ab5333c48dfc544/packages/flutter_tools/bin/xcode_backend.dart#L151 # How to fix ## Possible Fix 1 I tested this works, by changing this line: https://github.com/flutter/flutter/blob/master/packages/flutter_tools/bin/xcode_backend.dart#L159 into this: ``` if (!verbose && exitCode == 0 && !skipErrorLog) ``` ## Possible fix 2: Surprisingly this also works: ``` if (!verbose && exitCode == 0) { streamOutput(errorOutput.string().replaceAll('error', ''); } ``` Although we made sure `errorOutput` doesn't start with `error:`, there's an `error:` in the middle of the string. Possibly because of this code in `mac.dart`: https://github.com/flutter/flutter/blob/e4f27cd09734db6c6ed94e104ab5333c48dfc544/packages/flutter_tools/lib/src/ios/mac.dart#L431-L433 # Why we missed it? I tested my initial code code and assumed updated code would work, because I incorrectly thought `echoError` was the one triggered the output in non-verbose mode. I should have verified it.
…bose)" (flutter#173879) Reverts flutter#173569 Sorry I have to revert this one as it didn't work. # Why didn't work From the comment, it looks like `echoError` is only used for verbose mode, and `streamOutput` is used for non-verbose mode (I am still looking into how this is setup) https://github.com/flutter/flutter/blob/e4f27cd09734db6c6ed94e104ab5333c48dfc544/packages/flutter_tools/bin/xcode_backend.dart#L151 # How to fix ## Possible Fix 1 I tested this works, by changing this line: https://github.com/flutter/flutter/blob/master/packages/flutter_tools/bin/xcode_backend.dart#L159 into this: ``` if (!verbose && exitCode == 0 && !skipErrorLog) ``` ## Possible fix 2: Surprisingly this also works: ``` if (!verbose && exitCode == 0) { streamOutput(errorOutput.string().replaceAll('error', ''); } ``` Although we made sure `errorOutput` doesn't start with `error:`, there's an `error:` in the middle of the string. Possibly because of this code in `mac.dart`: https://github.com/flutter/flutter/blob/e4f27cd09734db6c6ed94e104ab5333c48dfc544/packages/flutter_tools/lib/src/ios/mac.dart#L431-L433 # Why we missed it? I tested my initial code code and assumed updated code would work, because I incorrectly thought `echoError` was the one triggered the output in non-verbose mode. I should have verified it.
…bose)" (flutter#173879) Reverts flutter#173569 Sorry I have to revert this one as it didn't work. # Why didn't work From the comment, it looks like `echoError` is only used for verbose mode, and `streamOutput` is used for non-verbose mode (I am still looking into how this is setup) https://github.com/flutter/flutter/blob/e4f27cd09734db6c6ed94e104ab5333c48dfc544/packages/flutter_tools/bin/xcode_backend.dart#L151 # How to fix ## Possible Fix 1 I tested this works, by changing this line: https://github.com/flutter/flutter/blob/master/packages/flutter_tools/bin/xcode_backend.dart#L159 into this: ``` if (!verbose && exitCode == 0 && !skipErrorLog) ``` ## Possible fix 2: Surprisingly this also works: ``` if (!verbose && exitCode == 0) { streamOutput(errorOutput.string().replaceAll('error', ''); } ``` Although we made sure `errorOutput` doesn't start with `error:`, there's an `error:` in the middle of the string. Possibly because of this code in `mac.dart`: https://github.com/flutter/flutter/blob/e4f27cd09734db6c6ed94e104ab5333c48dfc544/packages/flutter_tools/lib/src/ios/mac.dart#L431-L433 # Why we missed it? I tested my initial code code and assumed updated code would work, because I incorrectly thought `echoError` was the one triggered the output in non-verbose mode. I should have verified it.
Reverts #173569
Sorry I have to revert this one as it didn't work.
Why didn't work
From the comment, it looks like
echoErroris only used for verbose mode, andstreamOutputis used for non-verbose mode (I am still looking into how this is setup)flutter/packages/flutter_tools/bin/xcode_backend.dart
Line 151 in e4f27cd
How to fix
Possible Fix 1
I tested this works, by changing this line:
https://github.com/flutter/flutter/blob/master/packages/flutter_tools/bin/xcode_backend.dart#L159
into this:
Possible fix 2:
Surprisingly this also works:
Although we made sure
errorOutputdoesn't start witherror:, there's anerror:in the middle of the string.Possibly because of this code in
mac.dart:flutter/packages/flutter_tools/lib/src/ios/mac.dart
Lines 431 to 433 in e4f27cd
Why we missed it?
I tested my initial code code and assumed updated code would work, because I incorrectly thought
echoErrorwas the one triggered the output in non-verbose mode. I should have verified it.