-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
tooling: report gradle wrapper download progress #1182
tooling: report gradle wrapper download progress #1182
Conversation
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 for the pull request.
Download of the distribution happens in the tooling API client, so we don't need to, and should not, change any of the provider-side events or the protocol types.
Instead, the Download
implementation that is passed to the wrapper should forward progress events directly to the internal wrapper over the ProgressLogger
provided by the application.
This wrapper should not need to do any special processing to understand distribution download events.
@adammurdoch Thanks for your comments! That's why I decided to use new tooling client event listener which is extensible and will not force to parse every progress event description string (see I have feeling that downloading of the distribution can be considered as a part of the build. If I miss something and we should use legacy tooling logging listener, could you advise how can I pass the status event from |
We're generating a new kind of event, so I think we should pass in a new kind of listener to This listener would do 2 things:
|
@adammurdoch yep, sounds reasonable, thank you! I'll work on it at the beginning of the next week. |
eedfd35
to
f4e7781
Compare
4a31eda
to
579b77e
Compare
@adammurdoch I've accidentally pushed merge commit and other commits from master branch have appeared here. So, I had to reset my branch and force-pushed my changes using single commit, sorry for inconvenience. |
Thanks, perhaps remove any new types that are not yet needed. |
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.
We should remove the unused new type.
Also, it would be good to add an integration test for this. We could add some tests in ToolingApiRemoteIntegrationTest
(or a new test class) to make sure the events are received by the application.
@@ -154,6 +169,23 @@ private StartEvent startedEvent(InternalOperationStartedProgressEvent event) { | |||
return new DefaultStartEvent(event.getEventTime(), event.getDisplayName(), descriptor); | |||
} | |||
|
|||
private ProgressEvent statusEvent(InternalOperationStatusProgressEvent event) { |
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.
Do we need this yet? Certainly at some point (hopefully soon) we want to send status events from the daemon, but for this PR the only status events are coming from the client side.
579b77e
to
bcc6e35
Compare
bcc6e35
to
a721f78
Compare
I've added the test in Just to clarify, in order to avoid creation of a class duplicate for |
This looks good, I'll merge it soon. Thanks for making these changes. This is a long missing feature that will make the experience from the IDE much nicer for people. |
@adammurdoch I must be crazy, because I thought I saw this merged into |
It is correct. |
Any of the checked boxes below indicate that I took action:
./gradlew quickCheck
Tooling api should provide progress information during the gradle distribution download