Swift
On this page
cooldown gates Swift packages through --tool swift (aliases spm, swiftpm).
What it reads#
A Swift package is a Package.swift with its Package.resolved.
Registry#
Publish times come from GitHub Releases.
How it is driven#
cooldown runs swift, or the program COOLDOWN_SWIFT names:
check: proves the pins current, as described below.upgradeandfix: move each package withswift package update <identity>, which re-resolves it withinPackage.swift’s version constraints.--build: runsswift build.
swift package update installs as it pins, so Swift upgrades run one at a time across ecosystems;
see Several ecosystems at once.
How check proves the pins current#
check proves Package.resolved current with swift package resolve --force-resolved-versions.
It runs in place with its checkouts, caches, fingerprints and temporary files in a scratch
directory, so .build/ and the package stay as they were. A pin file Swift refuses as out of date
is stale, which --allow-stale-lock waives.
Edge cases#
The check fetches every pinned repository, so under --offline the lock is lock_unknown. The lock
is also lock_unknown when:
- no
Package.swiftsits beside it; - the package has a version-specific manifest or a legacy
.swiftpm/config; - a pin is not a versioned GitHub release;
- a pin is one the package no longer reaches;
- Swift fails any other way.