carton
carton copied to clipboard
If .swift-version contains a semantic version, check PATH locations first
Currently, carton always starts looking for swift binary in the ~/.swiftenv directory inferring the full path based on the content in .swift-version. This breaks when the version specified in .swift-version is not installed in ~/.swiftenv, e.g. a system version.
It make sense. But how to get the version of swift in the PATH locations?
I wonder if it could be parsed from swift --version output, but there's still no obvious way to verify it supports the WebAssembly target. It probably would need to compile something like a test.swift file, similarly to what we do on SwiftWasm CI.