Skip to content

Add Swift 6.1 manifest to forward Xet trait to swift-huggingface dependency#334

Merged
mattt merged 10 commits intomainfrom
mattt/conditional-xet-support
Mar 23, 2026
Merged

Add Swift 6.1 manifest to forward Xet trait to swift-huggingface dependency#334
mattt merged 10 commits intomainfrom
mattt/conditional-xet-support

Conversation

@mattt
Copy link
Collaborator

@mattt mattt commented Mar 16, 2026

Follow up to #315

swift-xet depends on async-http-client for fast, parallel downloads. Unfortunately, AsyncHTTPClient has a bunch of transitive dependences, which some package consumers find unacceptable.

huggingface/swift-huggingface#46 adds a new opt-in "Xet" trait to conditionalize this dependency. This PR adds the plumbing required for consumers of the swift-transformers package to opt-in to that feature as well.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a Swift 6.1-specific package manifest so swift-transformers consumers can opt into the upstream swift-huggingface "Xet" trait (and therefore its Xet transport support) without imposing extra transitive dependencies by default.

Changes:

  • Introduces Package@swift-6.1.swift using SwiftPM 6.1 features to define an "Xet" trait at the swift-transformers package level.
  • Forwards the "Xet" trait conditionally to the swift-huggingface dependency when consumers enable it.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mattt mattt force-pushed the mattt/conditional-xet-support branch from 94be05f to 14d5986 Compare March 16, 2026 17:12
@mattt mattt requested a review from pcuenca March 16, 2026 17:26

test-linux:
name: Test (Linux)
name: Test (Linux)${{ matrix.traits != '' && format(' with --traits {0}', matrix.traits) || '' }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh nice

Copy link
Member

@pcuenca pcuenca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally, amazing work! 🙌

@pcuenca
Copy link
Member

pcuenca commented Mar 23, 2026

cc @ZachNagengast, this will be release 1.3.0.

@mattt mattt merged commit b38443e into main Mar 23, 2026
4 checks passed
@mattt mattt deleted the mattt/conditional-xet-support branch March 23, 2026 18:34
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.

3 participants