Skip to content

Commit 958167a

Browse files
rcfaclaude
andcommitted
Vendored swift-transformers: add Sendable to Hub.Repo and Hub.RepoType
Under Swift 6 strict concurrency, `Hub.RepoType` and `Hub.Repo` need `Sendable` to cross actor/task boundaries; without it, builds that touch these types from concurrent contexts fail. Both are trivially sendable — a `String`-raw enum and an all-`let` struct of `Sendable` fields. Adds the conformance to the vendored copy so vmlx-swift builds clean under Swift 6 without waiting on an upstream swift-transformers release + vendor bump. No behavior change. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent d103e0c commit 958167a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • Vendors/swift-transformers/Sources/Hub

Vendors/swift-transformers/Sources/Hub/Hub.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public extension Hub {
7777
}
7878

7979
/// The type of repository on the Hugging Face Hub.
80-
enum RepoType: String, Codable {
80+
enum RepoType: String, Codable, Sendable {
8181
/// Model repositories containing machine learning models.
8282
case models
8383
/// Dataset repositories containing training and evaluation data.
@@ -90,7 +90,7 @@ public extension Hub {
9090
///
9191
/// A repository is identified by its unique ID and type, allowing access to
9292
/// different kinds of resources hosted on the Hub platform.
93-
struct Repo: Codable {
93+
struct Repo: Codable, Sendable {
9494
/// The unique identifier for the repository (e.g., "microsoft/DialoGPT-medium").
9595
public let id: String
9696
/// The type of repository (models, datasets, or spaces).

0 commit comments

Comments
 (0)