Remove unused Combine import#287
Merged
pcuenca merged 6 commits intohuggingface:mainfrom Nov 24, 2025
Merged
Conversation
Remove unused combine dependency
mattt
approved these changes
Nov 16, 2025
Collaborator
mattt
left a comment
There was a problem hiding this comment.
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>
Contributor
Author
|
I’ve updated the PR title and description to match the purpose of this change. |
mattt
reviewed
Nov 16, 2025
Co-authored-by: Mattt <mattt@me.com>
pcuenca
approved these changes
Nov 24, 2025
Member
pcuenca
left a comment
There was a problem hiding this comment.
Thanks @Skyline-23 and @mattt 🙌
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.