-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Show progress bar while downloading Swift SDK bundles #7315
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
Show progress bar while downloading Swift SDK bundles #7315
Conversation
The download operation takes a while, and it makes users feel like SwiftPM is stuck. This patch adds a progress indicator to the download operation to make it clear that SwiftPM is still working and how much work is left.
@swift-ci Please test |
@@ -47,7 +49,10 @@ public struct InstallSwiftSDK: SwiftSDKSubcommand { | |||
swiftSDKsDirectory: swiftSDKsDirectory, | |||
fileSystem: self.fileSystem, | |||
observabilityScope: observabilityScope, | |||
outputHandler: { print($0.description) } | |||
outputHandler: { print($0.description) }, | |||
downloadProgressAnimation: ThrottledProgressAnimation( |
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.
Progress animation is throttled by timer to avoid too flickering animation triggered by HTTPClient
's too frequent progress reports.
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.
Since swift-tools-support-core
is deprecated, would you mind adding this new types to the Basics
module in SwiftPM instead?
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.
Okay, move it to SwiftPM repo
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.
Overall makes sense, but we shouldn't be adding any new code to TSC at this point.
To avoid intoroducing a new code in TSC
@swift-ci test |
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.
Thank you 🙏
@swift-ci test windows |
@swift-ci Please test |
@swift-ci test windows |
Motivation:
The download operation takes a while, and it makes users feel like SwiftPM is stuck.
Modifications:
This patch adds a progress indicator to the download operation to make it clear that SwiftPM is still working and how much work is left.
Screen.Recording.2024-02-03.at.19.48.14.mov