Skip to content

Raise swift-syntax floor to 602.0.0 for prebuilt artifact resolution#340

Open
roryford wants to merge 1 commit into
ml-explore:mainfrom
roryford:macro-free-huggingface-bridges
Open

Raise swift-syntax floor to 602.0.0 for prebuilt artifact resolution#340
roryford wants to merge 1 commit into
ml-explore:mainfrom
roryford:macro-free-huggingface-bridges

Conversation

@roryford

@roryford roryford commented Jun 11, 2026

Copy link
Copy Markdown

Narrowed from the original proposal. This PR is now only the swift-syntax floor bump, flagged as useful

Why: swift.org publishes signed prebuilt swift-syntax artifacts only for >= 602 tags on current toolchains. A 600.x/601.x resolution silently falls back to compiling swift-syntax from source. Measured on Swift 6.3.2 / Xcode 26.5: forcing source compile adds ~46 Swift-compile tasks / ~29s of compile CPU per cold build (SwiftCompile 24.1s → 53.2s) that the prebuilt skips entirely.

@roryford roryford marked this pull request as draft June 11, 2026 11:58
@roryford roryford force-pushed the macro-free-huggingface-bridges branch from be4bba7 to 7694c4d Compare June 11, 2026 12:12
@roryford roryford changed the title Add macro-free public API for MLXHuggingFace bridges (#339) Add MLXHuggingFaceBridges product: macro-free equivalents (#339) Jun 11, 2026
Comment thread Package.swift
Comment on lines +43 to +46
// 602.0.0 floor: swift.org publishes signed prebuilt swift-syntax artifacts only for
// >= 602 tags on current toolchains; a 600.x/601.x resolution falls back to the full
// source compile of swift-syntax.
.package(url: "https://github.com/swiftlang/swift-syntax.git", "602.0.0" ..< "604.0.0"),

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This looks useful!

Comment thread Package.swift Outdated
Comment on lines +47 to +48
.package(url: "https://github.com/huggingface/swift-transformers", from: "1.3.0"),
.package(url: "https://github.com/huggingface/swift-huggingface", from: "0.9.0"),

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We can't do this -- see #118 . The package resolution can't be turned off and name collisions are not allowed. There is some aliasing capability, but it was unable to solve it.

This is how we ended up with the macros. Or you can use the external (to mlx-explore) implementations.

swift.org's signed prebuilt swift-syntax artifacts are keyed per
swift-syntax tag and exact toolchain, and 600.x/601.x artifacts are no
longer published for current toolchains. A package graph that resolves
below 602 silently falls back to compiling swift-syntax from source
(~200 build tasks). Raising the floor keeps consumers on the prebuilt
path. See ml-explore#339 for measurements.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@roryford roryford force-pushed the macro-free-huggingface-bridges branch from 7694c4d to d6924bf Compare June 12, 2026 10:26
@roryford roryford changed the title Add MLXHuggingFaceBridges product: macro-free equivalents (#339) Raise swift-syntax floor to 602.0.0 for prebuilt artifact resolution Jun 12, 2026
@roryford roryford marked this pull request as ready for review June 12, 2026 10: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.

2 participants