-
Notifications
You must be signed in to change notification settings - Fork 9.8k
[flutter_plugin_tools] If clang-format
does not run, fall back to other executables in PATH
#6853
Conversation
faf341d
to
d0bad67
Compare
@@ -1,4 +1,8 @@ | |||
## 13.1 |
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.
Hm
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.
Great idea, LGTM!
print('\nTo fix run "pub global activate flutter_plugin_tools && ' | ||
'pub global run flutter_plugin_tools format" or copy-paste ' | ||
print('\nTo fix run "dart pub global activate flutter_plugin_tools && ' | ||
'dart pub global run flutter_plugin_tools format" or copy-paste ' |
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.
Thanks, I thought I'd fixed this everywhere, but apparently only in CI scripts.
} | ||
|
||
final String stdout = result.stdout as String; | ||
if (stdout.isEmpty) { |
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.
Shouldn't the trim
be before this check?
@@ -1,4 +1,8 @@ | |||
## 13.1 |
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.
Oops. (Since this isn't in packages/ it doesn't get the metadata checks.)
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.
Does script/tool still need to be versioned like this?
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.
I publish it periodically so that flutter/packages can use the latest updates, so it does need versioning. Once the repo merge is done it won't.
auto label is removed for flutter/plugins, pr: 6853, due to - The status or check suite android-platform_tests CHANNEL:master PACKAGE_SHARDING:--shardIndex 4 --shardCount 5 has failed. Please fix the issues identified (or deflake) before re-applying this label. |
Re-running the flaky test. |
… back to other executables in PATH (flutter/plugins#6853)
* 5f62d21eb [local_auth] Fix failed biometric authentication not throwing error (flutter/plugins#6821) * ca974ab0c [webview_flutter_web] Copies web implementation of webview_flutter from v4_webview (flutter/plugins#6854) * 4d11be416 [image_picker] Don't store null paths in lost cache (flutter/plugins#6678) * fd2841fd0 [webview_flutter_android] Fix timeouts in the integration tests (flutter/plugins#6857) * abc9f9a9b [flutter_plugin_tools] If `clang-format` does not run, fall back to other executables in PATH (flutter/plugins#6853) * 7efb5e89d [video_player] Add compatibility with the current platform interface (flutter/plugins#6855) * 32dcbf3e3 [image_picker] Improve image_picker for iOS to handle more image types (flutter/plugins#6812) * 840a04954 [webview_flutter] Copies app-facing implementation of webview_flutter from v4_webview (flutter/plugins#6856)
…#117314) * 5f62d21eb [local_auth] Fix failed biometric authentication not throwing error (flutter/plugins#6821) * ca974ab0c [webview_flutter_web] Copies web implementation of webview_flutter from v4_webview (flutter/plugins#6854) * 4d11be416 [image_picker] Don't store null paths in lost cache (flutter/plugins#6678) * fd2841fd0 [webview_flutter_android] Fix timeouts in the integration tests (flutter/plugins#6857) * abc9f9a9b [flutter_plugin_tools] If `clang-format` does not run, fall back to other executables in PATH (flutter/plugins#6853) * 7efb5e89d [video_player] Add compatibility with the current platform interface (flutter/plugins#6855) * 32dcbf3e3 [image_picker] Improve image_picker for iOS to handle more image types (flutter/plugins#6812) * 840a04954 [webview_flutter] Copies app-facing implementation of webview_flutter from v4_webview (flutter/plugins#6856)
…ther executables in PATH (flutter#6853) * If clang-format does not run, fall back to other executables in PATH * Review edits
When
clang-format
does not run (i.e. failingchromium/depot_tools/clang-format
, loop through all theclang-format
executables in the PATH until a working one is found. If none run then bail with the same error as before.Running
pub global...
fails withcommand not found: pub
. Updatepub global
instructions todart pub global
.Fixes flutter/flutter#117195
Pre-launch Checklist
dart format
.)[shared_preferences]
pubspec.yaml
with an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.CHANGELOG.md
to add a description of the change, following repository CHANGELOG style.///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.