mxcl / swift-sh

Easily script with third-party Swift dependencies.
The Unlicense
1.8k stars 59 forks source link

Error reference to member `v12_1` cannot be resolved #179

Open Jeehut opened 3 years ago

Jeehut commented 3 years ago

I'm on latest stable version of macOS (12.0.1) and Xcode (13.1) and I get this error:

~/Library/Developer/swift-sh.cache/0f52af8da2fce590923c596de278045a: error: manifest parse error(s):
~/Library/Developer/swift-sh.cache/0f52af8da2fce590923c596de278045a/Package.swift:24:13: error: reference to member 'v12_1' cannot be resolved without a contextual type
    .macOS(.v12_1)

Could it be that another update of Swift-SH is needed to fix this?

The error happens when trying to import AnyLint in a script like this:

#!/usr/local/bin/swift-sh
import AnyLint // @Flinesoft ~> 0.8.3

// some code using AnyLint

I have the latest version 2.3.1 installed. I also tried running swift-sh --clean-cache and then my script, same result.

Here's also the full output of swift --version:

swift-driver version: 1.26.9 Apple Swift version 5.5.1 (swiftlang-1300.0.31.4 clang-1300.0.29.6)
Target: x86_64-apple-macosx12.0
mxcl commented 3 years ago

It’s painful that we cannot easily anticipate this stuff and fix it in advance.