Skip to content

fix: match Swift 6.4.0 release and snapshot naming - #549

Open
tothambrus11 wants to merge 1 commit into
SwiftyLab:mainfrom
tothambrus11:main
Open

tothambrus11 wants to merge 1 commit into
SwiftyLab:mainfrom
tothambrus11:main

Conversation

@tothambrus11

@tothambrus11 tothambrus11 commented Sep 19, 2026

Copy link
Copy Markdown

Summary

Requesting an exact x.y.0 toolchain fails for Swift 6.4 on every platform, because swift.org changed how it names a zero patch release and its development snapshot directory.

The fix is written by Claude, so feel free to discard it if it's inappropriate.

Problem

- uses: SwiftyLab/setup-swift@v1
  with:
    swift-version: '6.4.0'
::error::No Swift toolchain found for version: 6.4.0, dev: false

The failure reproduces on Linux, macOS and Windows, for both installs and dry-run, and equally with development: true. Range requests (6.4), latest, and non zero patch pins (6.4.1) are unaffected, so the problem only appears when a workflow pins the first release of a version line.

Root cause

swift.org changed its naming convention with Swift 6.4. Through 6.3, a zero patch release dropped the patch component in _data/builds/swift_releases.yml:

- name: "6.3"
  tag: swift-6.3-RELEASE

From 6.4 the component is kept:

- name: "6.4.0"
  tag: swift-6.4.0-RELEASE

The development builds were renamed alongside it: snapshots moved from _data/builds/swift-6_3-branch (tagged swift-6.3-DEVELOPMENT-SNAPSHOT-*) to _data/builds/swift-6_4_x-branch (tagged swift-6.4.x-DEVELOPMENT-SNAPSHOT-*).

SemanticToolchainVersion separates a range request (6.4, meaning the newest 6.4.x) from an exact one (6.4.0) by appending the tag separator to the version prefix, producing the matcher /swift-6\.4-/ and the glob swift-6_4-*. The trailing - is what excludes swift-6.4.1-RELEASE from an exact 6.4.0 request. Under the new names neither matches:

  • /swift-6\.4-/ does not match swift-6.4.0-RELEASE, so satisfiedBy rejects the release and releasedTools yields nothing.
  • swift-6_4-* does not match the swift-6_4_x-branch directory, so the development snapshot path yields nothing either.

With no candidates from either source, Platform.toolchain returns undefined and the action fails the step. The logic was correct for every release up to 6.3; it stopped matching when swift.org began emitting the other spelling.

The swift.org metadata pipeline is not involved: the published metadata.json already pins a swift-org-website commit containing the complete 6.4.0 entry, and latest resolves to swift-6.4.0-RELEASE correctly both before and after this change.

This branch has not been deployed

No deployments
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.

1 participant