fix: match Swift 6.4.0 release and snapshot naming - #549
Open
tothambrus11 wants to merge 1 commit into
Open
tothambrus11 wants to merge 1 commit into
tothambrus11 wants to merge 1 commit into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Requesting an exact
x.y.0toolchain 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
The failure reproduces on Linux, macOS and Windows, for both installs and
dry-run, and equally withdevelopment: 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:From 6.4 the component is kept:
The development builds were renamed alongside it: snapshots moved from
_data/builds/swift-6_3-branch(taggedswift-6.3-DEVELOPMENT-SNAPSHOT-*) to_data/builds/swift-6_4_x-branch(taggedswift-6.4.x-DEVELOPMENT-SNAPSHOT-*).SemanticToolchainVersionseparates 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 globswift-6_4-*. The trailing-is what excludesswift-6.4.1-RELEASEfrom an exact6.4.0request. Under the new names neither matches:/swift-6\.4-/does not matchswift-6.4.0-RELEASE, sosatisfiedByrejects the release andreleasedToolsyields nothing.swift-6_4-*does not match theswift-6_4_x-branchdirectory, so the development snapshot path yields nothing either.With no candidates from either source,
Platform.toolchainreturnsundefinedand 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.jsonalready pins aswift-org-websitecommit containing the complete 6.4.0 entry, andlatestresolves toswift-6.4.0-RELEASEcorrectly both before and after this change.