Feature/increase compatibility #288
Closed
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 updates the Swift package to add cryptographic support and refactors download progress reporting. The main changes include adding the swift-crypto dependency, updating imports to use the new crypto library, and revising documentation to clarify progress reporting via AsyncStream.
To increase Cross-Platform Compatibility for Tokenizer Support on Linux and Windows
Dependency updates:
Added swift-crypto as a new package dependency in Package.swift, and included Crypto as a dependency for the Hub target.
Codebase refactoring:
Updated import statements to use Crypto instead of CryptoKit in Sources/Hub/HubApi.swift.
Removed unused Combine import from Sources/Hub/Downloader.swift and Tests/HubTests/DownloaderTests.swift. [1] [2]
Removed ObservableObject conformance from the Downloader class, as progress reporting is now handled via AsyncStream.
Documentation improvements:
Revised comments in HubApi.swift to clarify that download progress is emitted via AsyncStream, and that a Combine wrapper can be added if needed for SwiftUI integration.This pull request refactors the progress reporting mechanism in the Downloader class and updates related documentation and tests. The main change is the removal of Combine-based progress reporting in favor of using AsyncStream, with guidance for bridging to Combine if necessary. This simplifies the downloader’s interface and clarifies its intended usage.
Progress reporting and API documentation:
Updated the documentation in HubApi to clarify that Downloader now emits progress updates via AsyncStream, and that a Combine wrapper can be added if needed for SwiftUI compatibility.
Codebase simplification:
Removed ObservableObject conformance from the Downloader class in Downloader.swift, reflecting the shift away from Combine-based progress reporting.
Removed the unused Combine import from both Downloader.swift and DownloaderTests.swift, cleaning up dependencies. [1] [2]