Repository navigation
Install the cross-compile Swift SDK matching the container toolchain - #72
Merged
Merged
Conversation
Renovate bumped the Cross-Compile containers to swift:6.4.1 (#71) while the workflow still installed the pinned 6.3.3 SDKs. A Swift SDK must match the compiler exactly, so all three jobs failed. Scripts/install-swift-sdk.sh reads the toolchain release tag from `swift --version` and looks up the SDK URL and checksum in the official swift.org release API, so future Renovate bumps keep working. The wasm and Android SDK IDs are discovered via `swift sdk list`. Claude-Session: https://claude.ai/code/session_011WSUtoLptjea3s3iC5wTNC
With 6.4.1, `swift sdk list` prints bundle names instead of target triples, so the Android SDK lookup came back empty. Claude-Session: https://claude.ai/code/session_011WSUtoLptjea3s3iC5wTNC
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.
Problem
Renovate's #71 bumped the Cross-Compile containers to
swift:6.4.1, but the workflow still installed the pinned 6.3.3 Swift SDKs. An SDK must match the compiler version exactly, so Musl, WASI and Android all fail onmasterand on #69.Change
Scripts/install-swift-sdk.sh <static|wasm|android>:swift --version. It handlesswift-6.4-RELEASE, which the API lists as6.4.0./api/v1/install/releases.json), the same source the pinned checksums came from;swift sdk install <url> --checksum <sha256>.The wasm and Android build steps discover their SDK IDs via
swift sdk listinstead of hard-coding them. Renovate can keep bumping the container tags, and the SDKs follow.Trade-off: checksums are no longer pinned in the repo. They come over HTTPS from swift.org at install time, from the same host that serves the bundles.
Tests
swiftbinary for 6.4.1, 6.4 (→ 6.4.0) and 6.3.3. The URLs it builds exist, and for 6.3.3 it produces exactly the checksums that were pinned before.swift:6.4.1is the real test.https://claude.ai/code/session_011WSUtoLptjea3s3iC5wTNC