Skip to content

Commit

Permalink
Only run the formatter on the bots for the master channel and add mis…
Browse files Browse the repository at this point in the history
…sing VmService method (#3202)
  • Loading branch information
kenzieschmoll authored Jul 16, 2021
1 parent 6303a80 commit b20e647
Show file tree
Hide file tree
Showing 10 changed files with 39 additions and 21 deletions.
4 changes: 3 additions & 1 deletion packages/devtools_app/lib/src/debugger/debugger_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,9 @@ List<Variable> _createVariablesForAssociations(
isolateRef: isolateRef,
);
variables.add(
Variable.text('[Entry $i]')..addChild(key)..addChild(value),
Variable.text('[Entry $i]')
..addChild(key)
..addChild(value),
);
}
return variables;
Expand Down
21 changes: 16 additions & 5 deletions packages/devtools_app/lib/src/http/_http_cookies.dart
Original file line number Diff line number Diff line change
Expand Up @@ -143,18 +143,29 @@ class Cookie {

String toString() {
StringBuffer sb = new StringBuffer();
sb..write(_name)..write("=")..write(_value);
sb
..write(_name)
..write("=")
..write(_value);
if (expires != null) {
sb..write("; Expires=")..write(HttpDate.format(expires));
sb
..write("; Expires=")
..write(HttpDate.format(expires));
}
if (maxAge != null) {
sb..write("; Max-Age=")..write(maxAge);
sb
..write("; Max-Age=")
..write(maxAge);
}
if (domain != null) {
sb..write("; Domain=")..write(domain);
sb
..write("; Domain=")
..write(domain);
}
if (path != null) {
sb..write("; Path=")..write(path);
sb
..write("; Path=")
..write(path);
}
if (secure) sb.write("; Secure");
if (httpOnly) sb.write("; HttpOnly");
Expand Down
4 changes: 3 additions & 1 deletion packages/devtools_app/lib/src/http/_http_exception.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ class HttpException {

@override
String toString() {
final b = StringBuffer()..write('HttpException: ')..write(message);
final b = StringBuffer()
..write('HttpException: ')
..write(message);
if (uri != null) {
b.write(', uri = $uri');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,8 @@ class LegacyTimelineEventGroup {
List<LegacyTimelineEvent>.from(rowIndexForEvent.keys)
.where((event) => event.isRoot)
.toList()
..sort((a, b) => a.time.start.inMicroseconds
.compareTo(b.time.start.inMicroseconds));
..sort((a, b) =>
a.time.start.inMicroseconds.compareTo(b.time.start.inMicroseconds));
List<LegacyTimelineEvent> _sortedEventRoots;

int get displayDepth => rows.length;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -544,10 +544,10 @@ class LegacyTimelineEventProcessor {
final frames = pendingFrames.values
.where((frame) => frame.pipelineItemTime.start != null)
.toList()
..sort((LegacyFlutterFrame a, LegacyFlutterFrame b) {
return a.pipelineItemTime.start.inMicroseconds
.compareTo(b.pipelineItemTime.start.inMicroseconds);
});
..sort((LegacyFlutterFrame a, LegacyFlutterFrame b) {
return a.pipelineItemTime.start.inMicroseconds
.compareTo(b.pipelineItemTime.start.inMicroseconds);
});
for (LegacyFlutterFrame frame in frames) {
final eventAdded = _maybeAddEventToFrame(event, frame);
if (eventAdded) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,8 @@ class TimelineEventGroup {
_sortedEventRoots ??= List<TimelineEvent>.from(rowIndexForEvent.keys)
.where((event) => event.isRoot)
.toList()
..sort((a, b) => a.time.start.inMicroseconds
.compareTo(b.time.start.inMicroseconds));
..sort((a, b) =>
a.time.start.inMicroseconds.compareTo(b.time.start.inMicroseconds));
List<TimelineEvent> _sortedEventRoots;

int get displayDepth => rows.length;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -540,10 +540,10 @@ class TimelineEventProcessor {
final frames = pendingFrames.values
.where((frame) => frame.pipelineItemTime.start != null)
.toList()
..sort((FlutterFrame a, FlutterFrame b) {
return a.pipelineItemTime.start.inMicroseconds
.compareTo(b.pipelineItemTime.start.inMicroseconds);
});
..sort((FlutterFrame a, FlutterFrame b) {
return a.pipelineItemTime.start.inMicroseconds
.compareTo(b.pipelineItemTime.start.inMicroseconds);
});
for (FlutterFrame frame in frames) {
final eventAdded = _maybeAddEventToFrame(event, frame);
if (eventAdded) {
Expand Down
2 changes: 1 addition & 1 deletion packages/devtools_app/lib/src/version.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class FlutterVersion extends SemanticVersion {
.split('.')
.map((part) => RegExp(r'\d+').stringMatch(part) ?? '')
.toList()
..removeWhere((part) => part.isEmpty);
..removeWhere((part) => part.isEmpty);
preReleaseMajor = preReleaseParts.isNotEmpty
? int.tryParse(preReleaseParts.first) ?? 0
: 0;
Expand Down
3 changes: 3 additions & 0 deletions packages/devtools_app/lib/src/vm_service_wrapper.dart
Original file line number Diff line number Diff line change
Expand Up @@ -689,6 +689,9 @@ class VmServiceWrapper implements VmService {
@override
Stream<Event> get onDebugEvent => _vmService.onDebugEvent;

@override
Stream<Event> get onProfilerEvent => _vmService.onProfilerEvent;

@override
Stream<Event> onEvent(String streamName) => _vmService.onEvent(streamName);

Expand Down
2 changes: 1 addition & 1 deletion tool/bots.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ if [ "$BOT" = "main" ]; then
# Provision our packages.
flutter pub get

if [ "$CHANNEL" != "master" ]; then
if [ "$CHANNEL" = "master" ]; then
# Verify that dart format has been run.
echo "Checking formatting..."
# Here, we use the dart instance from the flutter sdk.
Expand Down

0 comments on commit b20e647

Please sign in to comment.