-
Notifications
You must be signed in to change notification settings - Fork 330
show service protocol logging events in the console view #3624
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
|
cc @DanTup for the code related to listening for and displaying service protocol |
pq
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.
It looks like there are a bunch of timeline VM service-related changes in here too. Not sure if that's intentional?
| public void clearVMTimeline(SuccessConsumer consumer) { | ||
| final JsonObject params = new JsonObject(); | ||
| request("_clearVMTimeline", params, consumer); | ||
| request("clearVMTimeline", params, consumer); |
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.
Deferring to @kenzieschmoll on these protocol changes...
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.
These calls aren't used by the Flutter IntelliJ client, so should be no-ops in terms of the change.
| * @param gc This parameter is optional and may be null. | ||
| * The [getAllocationProfile] RPC is used to retrieve allocation information for a given isolate. | ||
| * @param reset This parameter is optional and may be null. | ||
| * @param gc This parameter is optional and may be null. |
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.
Aside (and maybe for another time): consider annotation these @Nullable?
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.
This library is generated by another tool (https://github.com/dart-lang/vm_service_drivers) - it would be tricky to reference org.jetbrains.annotations classes.
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.
Actually, to follow up on this, I think that IntelliJ's NNBD code also works with the javax.annotation.Nullable / javax.annotation.Notnull annotations, so we can add NNBD metadata to these calls. Definitely worth looking into.
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.
dart-archive/vm_service_drivers#250, thought I don't know if its something we should land
pq
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.
Logging bits look great! 🔥
| @@ -0,0 +1,84 @@ | |||
| /* | |||
| * Copyright (c) 2015, the Dart project authors. | |||
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.
If this (and others) are newly generated, consider updating copyright date?
| import com.google.gson.JsonObject; | ||
|
|
||
| /** | ||
| * An {@link MemoryUsage} object provides heap usage information for a specific isolate at a given |
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.
An => A
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.
done (on the next roll of this library; https://dart-review.googlesource.com/c/sdk/+/107800)
Yup; done as a separate commit from the other changes to make the review easier (which I should have mentioned in the first comment). The lib changes bring in a public API to work with the Logging code. |
* upgrade the vm service library * show service protocol logging events in the console view
This PR shows service protocol
'Logging'events in the run and debug consoles. I bumped the vm service protocol library classes for this - done as a separate commit for easier reviewability.There's a small bit of code in here related to
'Flutter.Error'events; it's all disabled behind a compile time flag however.