Got errors when running make
lfarah opened this issue · 1 comments
lfarah commented
lucasfarah@Lucass-MacBook-Pro ~/Downloads/needless-master make
rm -rf .build
swift build -c release
Compile Swift Module 'needless' (1 sources)
/Users/lucasfarah/Downloads/needless-master/Sources/main.swift:80:50: error: boolean condition requires 'where' to separate it from variable binding
let last = firstLabel.splitByCamelCase().last,
^
where
/Users/lucasfarah/Downloads/needless-master/Sources/main.swift:82:5: error: binding ended by previous 'where' clause; use 'let' to introduce a new one
head.firstType.lowercased().hasSuffix(last.lowercased()),
^
let
/Users/lucasfarah/Downloads/needless-master/Sources/main.swift:82:61: error: variable binding in a condition requires an initializer
head.firstType.lowercased().hasSuffix(last.lowercased()),
^
/Users/lucasfarah/Downloads/needless-master/Sources/main.swift:82:61: error: boolean condition requires 'where' to separate it from variable binding
head.firstType.lowercased().hasSuffix(last.lowercased()),
^
where
/Users/lucasfarah/Downloads/needless-master/Sources/main.swift:82:5: error: pattern matching in a condition requires the 'case' keyword
head.firstType.lowercased().hasSuffix(last.lowercased()),
^
case
/Users/lucasfarah/Downloads/needless-master/Sources/main.swift:139:19: error: 'NSRegularExpression' has been renamed to 'RegularExpression'
let pattern = try NSRegularExpression(pattern: headString, options: [])
^~~~~~~~~~~~~~~~~~~
RegularExpression
/Users/lucasfarah/Downloads/needless-master/Sources/main.swift:201:15: error: unknown attribute 'escaping'
formatter: @escaping SuggestionFormatter, diffMode: Bool)
^
/Users/lucasfarah/Downloads/needless-master/Sources/main.swift:193:8: error: ambiguous use of 'init(repeating:count:)'
"\(String(repeating: " ", count: old.pos))^",
^
Swift.String:11:12: note: found this candidate
public init(repeating repeatedValue: Character, count: Int)
^
Swift.String:21:12: note: found this candidate
public init(repeating repeatedValue: UnicodeScalar, count: Int)
^
/Users/lucasfarah/Downloads/needless-master/Sources/main.swift:209:35: error: cannot convert value of type '[(head: FunctionHead) -> Suggestion?]' to expected argument type '[Suggester]'
.flatMap { suggest($0, rules: rules) }
^~~~~
/Users/lucasfarah/Downloads/needless-master/Sources/main.swift:221:17: error: use of unresolved identifier 'CommandLine'
let options = CommandLine.arguments.filter { $0.hasPrefix("-") }
^~~~~~~~~~~
/Users/lucasfarah/Downloads/needless-master/Sources/main.swift:239:15: error: use of unresolved identifier 'CommandLine'
let files = CommandLine.arguments.filter { !$0.hasPrefix("-") }
^~~~~~~~~~~
<unknown>:0: error: build had 1 command failures
error: exit(1): /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2016-06-20-a.xctoolchain/usr/bin/swift-build-tool -f /Users/lucasfarah/Downloads/needless-master/.build/release.yaml
make: *** [build] Error 1
dduan commented
You need Swift 3.