Skip to content

Conversation

@piotrkowalczuk
Copy link
Contributor

@piotrkowalczuk piotrkowalczuk commented Mar 22, 2025

This PR is a follow-up for #189 and is related to #172. It changes the remaining parts of the Hub package to be compatible with structured concurrency. As a result:

  • Downloader, LanguageModelConfigurationFromHub and HubApi conform to the Sendable protocol.
  • Broadcaster<E: Sendable> got added as a building block replacing CurrentValueSubject.
  • Extra flags added to Package.swift that enable selective support for StrictConcurrency to Hub and HubTests packages.

Relevant changes to this PR are located in Source/Hub/Hub, Source/Hub/HubApi, Tests/HubTests/DownloaderTests.swift and Package.swift.

@FL33TW00D FL33TW00D mentioned this pull request Apr 1, 2025
8 tasks
@piotrkowalczuk piotrkowalczuk force-pushed the sendable-downloader branch 2 times, most recently from c0f0ef2 to 53bfa0b Compare June 8, 2025 22:27
@piotrkowalczuk
Copy link
Contributor Author

I believe this PR is now ready for review.

//cc @FL33TW00D

@piotrkowalczuk piotrkowalczuk changed the title Swift 6 compatible Hub package Hub package compatible with StrictConcurrency Jun 8, 2025
@FL33TW00D
Copy link
Contributor

Hey @piotrkowalczuk,
Would you mind doing the following:

# Install SwiftFormat if you haven't already
brew install swiftformat

# Format all Swift files
swiftformat --config .swiftformat .

@piotrkowalczuk
Copy link
Contributor Author

@FL33TW00D done

@FL33TW00D
Copy link
Contributor

Sorry for the delay here @piotrkowalczuk, I've had to call in the big guns (@pcuenca) to review this one.

@piotrkowalczuk
Copy link
Contributor Author

Friendly reminder 😄

@FL33TW00D
Copy link
Contributor

@piotrkowalczuk sorry for the delay here, thank you for the fantastic work!

@FL33TW00D FL33TW00D merged commit b9209b9 into huggingface:main Jul 17, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants