Swift Package Manager tools version for development snapshots
In Package.swift
// swift-tools-version:5.3
Although it's a comment and it should be ignored, it's not! change it to :
// swift-tools-version:5.2
Sometimes you need to delete .build
and .swiftpm
directories (that are hiddent by default) too.
Note
Don't forget to close and reopen the project after the changes.
To use the new toolchain from the command line, you first need to export it:$ export TOOLCHAINS=swift
.
Then you can check which version you use with: $ swift --version
See apple documentation on managing multiple swift environment and choosing a swift version here.