SwiftPM "toolsVersion ... is not supported" in CI
SwiftPM refuses a manifest whose declared toolsVersion falls outside the range this SwiftPM understands. It appears when a dependency was written for a much newer (or much older) toolchain than the runner has.
What this error means
Resolution or build fails with "the package ... at ... toolsVersion (X) is not supported by the current version of SwiftPM", naming the offending package.
error: the package manifest at 'Package.swift' cannot be accessed (package at '.../SomeDep' @ 1.2.0 has toolsVersion 6.1.0 which is not supported by the current version of SwiftPM)Common causes
A dependency targets a newer SwiftPM
The pinned version of a dependency declares a toolsVersion past what the runner SwiftPM supports, so it cannot be loaded during resolution.
The runner toolchain is behind the ecosystem
An older Xcode/Swift on the runner cannot interpret manifests that assume a current SwiftPM.
How to fix it
Upgrade the runner toolchain
- Identify the toolsVersion the dependency requires.
- Select an Xcode/Swift on the runner that provides at least that SwiftPM.
- Re-run resolution.
- run: sudo xcode-select -s /Applications/Xcode_16.1.app
- run: swift package resolvePin the dependency to a compatible version
If you cannot upgrade the toolchain, constrain the dependency to a release whose toolsVersion your SwiftPM supports.
.package(url: "https://github.com/acme/SomeDep.git", from: "1.1.0")How to prevent it
- Track the SwiftPM version implied by your dependency updates.
- Keep runner Xcode current for actively maintained dependency graphs.
- Pin dependencies so a surprise major bump does not raise toolsVersion in CI.