Skip to content

Hub package compatible with StrictConcurrency #192

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

piotrkowalczuk
Copy link
Contributor

@piotrkowalczuk piotrkowalczuk commented Mar 22, 2025

This PR is a follow-up for #189. 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
Collaborator

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
Collaborator

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

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