carton icon indicating copy to clipboard operation
carton copied to clipboard

If .swift-version contains a semantic version, check PATH locations first

Open MaxDesiatov opened this issue 4 years ago • 2 comments

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.

MaxDesiatov avatar Jun 09 '20 08:06 MaxDesiatov

It make sense. But how to get the version of swift in the PATH locations?

RayZhao1998 avatar Jul 24 '20 13:07 RayZhao1998

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.

MaxDesiatov avatar Jul 24 '20 13:07 MaxDesiatov