Skip to content

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

Merged
soumyamahunt merged 1 commit into
SwiftyLab:mainfrom
tothambrus11:main
Sep 24, 2026
Merged

soumyamahunt merged 1 commit into
SwiftyLab:mainfrom
tothambrus11:main

Conversation

@tothambrus11

@tothambrus11 tothambrus11 commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor

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.

@codecov

codecov Bot commented Sep 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.45%. Comparing base (e14cfbb) to head (ffb2653).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #549      +/-   ##
==========================================
- Coverage   89.50%   89.45%   -0.06%     
==========================================
  Files          36       36              
  Lines        1153     1157       +4     
  Branches      170      171       +1     
==========================================
+ Hits         1032     1035       +3     
- Misses         66       67       +1     
  Partials       55       55              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@soumyamahunt
soumyamahunt merged commit 7ac6b0a into SwiftyLab:main Sep 24, 2026
15 of 16 checks passed
@soumyamahunt

Copy link
Copy Markdown
Contributor

Thanks @tothambrus11 for picking this. I have triggered a release which should make this fix available.

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