-
Notifications
You must be signed in to change notification settings - Fork 152
Remove unused Combine import #287
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
base: main
Are you sure you want to change the base?
Conversation
Remove unused combine dependency
mattt
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.
Hi @Skyline-23, thanks for opening this PR. I think removing the dependency on Combine for the internal Downloader type is a good change, but I'm not sold on the Crypto change. I don't believe Linux or Windows support is necessarily a goal for this project, so the additional dependency is a hard sell.
If you feel strongly about that, maybe we could decouple these? Merge the quick win for removing Combine, and then open a follow-up that explores swift-crypto as a conditional dependency for Linux and Windows?
Co-authored-by: Mattt <mattt@me.com>
|
I’ve updated the PR title and description to match the purpose of this change. |
mattt
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.
LGTM. Thoughts, @pcuenca?
Co-authored-by: Mattt <mattt@me.com>
This pull request refactors the
Downloaderclass and related code to remove its dependency on the Combine framework, simplifying its usage and integration. It also clarifies the download progress reporting mechanism and updates documentation accordingly.Summary of Changes
Dependency Removal and API Updates
ObservableObjectconformance from theDownloaderclass inDownloader.swift.Combineimport fromDownloader.swiftandDownloaderTests.swift.downloadmethod inHubApi.swiftto indicate that progress is now provided via a callback closure instead of Combine publishers.Documentation Improvements
HubApi.swiftto note that progress reporting occurs through a simple callback.Test Updates
Combineimports fromDownloaderTests.swift, reflecting the updated implementation.By removing Combine as a dependency, the downloader becomes more lightweight, easier to integrate, and clearer in how it reports download progress.