-
Notifications
You must be signed in to change notification settings - Fork 28.7k
Only show iOS simulators, reduce output spew in verbose #108345
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
Conversation
/// | ||
/// Simulated device types can be listed using the command | ||
/// `xcrun simctl list devicetypes`. | ||
class SimDeviceType { |
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.
|
||
final String name; | ||
|
||
static const SimControlListSection devices = SimControlListSection._('devices'); |
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.
Only devices
was used, remove this class and use the string instead.
|
||
final List<String> command = <String>[ | ||
..._xcode.xcrunCommand(), | ||
'simctl', | ||
'list', | ||
'devices', | ||
'booted', |
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.
Limiting to booted iOS devices since that's all we care about.
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.
nice!
@@ -156,30 +170,24 @@ class SimControl { | |||
} | |||
} | |||
|
|||
/// Returns a list of all available devices, both potential and connected. | |||
Future<List<SimDevice>> getDevices() async { |
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.
getDevices
was only used by getConnectedDevices
and tests, so remove the former.
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.
Nice, LGTM!
Reduce a lot of the verbose
flutter run
/test
/drive
spew by only querying for available, booted iOS simulators since that's the only way these simulators are used. This also avoids showing watchOS/tvOS running simulators as available targets in the IDE.This should make verbose logging easier to read and more concise. Bonus: less data to upload in LUCI.
Before (2300 lines)
After (80 lines)
Fixes #108342
Pre-launch Checklist
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.