vadymmarkov / Rexy

:dragon_face: POSIX Regular Expressions in Swift

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Installing swift 3 problem

jihadfee opened this issue · comments

root@swift:/home/ecnxdev/database/Sources# swift build -Xcc -I/usr/include/postgresql
Cloning https://github.com/vadymmarkov/Rexy.git
HEAD is now at 5cbb7a2 Fix tests
Resolved version: 0.6.1
Compile Swift Module 'Rexy' (5 sources)
Compile Swift Module 'POSIX' (11 sources)
/home/ecnxdev/database/Packages/Rexy-0.6.1/Sources/Rexy/Error.swift:10:22: error: 'ErrorProtocol' has been renamed to 'Error'
public struct Error: ErrorProtocol, CustomStringConvertible {
^~~~~~~~~~~~~
Error
/home/ecnxdev/database/Packages/Rexy-0.6.1/Sources/Rexy/Error.swift:26:43: warning: left side of nil coalescing operator '??' has non-optional type 'String', so the right side is never used
description = String(cString: buffer) ?? ""
~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~

/home/ecnxdev/database/Packages/Rexy-0.6.1/Sources/Rexy/Error.swift:10:22: error: 'ErrorProtocol' has been renamed to 'Error'
public struct Error: ErrorProtocol, CustomStringConvertible {
^~~~~~~~~~~~~
Error
/home/ecnxdev/database/Packages/Rexy-0.6.1/Sources/Rexy/Regex.swift:34:13: error: thrown expression type 'Error' does not conform to 'Error'
throw Error(result: result, compiledPattern: compiledPattern)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/ecnxdev/database/Packages/Rexy-0.6.1/Sources/Rexy/Regex.swift:152:18: error: 'init' has been renamed to 'init(describing:)'
replaced = String(replaced.utf8[replaced.utf8.startIndex ..< replacedEndIndex])
^
describing:
Swift.String:21:12: note: 'init' has been explicitly marked unavailable here
public init(: T)
^
/home/ecnxdev/database/Packages/Rexy-0.6.1/Sources/Rexy/Regex.swift:154:16: error: 'init' has been renamed to 'init(describing:)'
string = String(string.utf8[startIndex ..< endIndex])
^
describing:
Swift.String:21:12: note: 'init' has been explicitly marked unavailable here
public init(
: T)
^
/home/ecnxdev/database/Packages/Rexy-0.6.1/Sources/Rexy/String+Rexy.swift:12:19: warning: operator should no longer be declared with body; use a precedence group instead
infix operator =~ {associativity left precedence 140}
^
/home/ecnxdev/database/Packages/Rexy-0.6.1/Sources/Rexy/String+Rexy.swift:13:19: warning: operator should no longer be declared with body; use a precedence group instead
infix operator !~ {associativity left precedence 140}
^
:0: error: build had 1 command failures

@jihadfee, are you still experiencing issues?
In my branch, I am able to get swift test to successfully run all the test with 0 failures. During build you'll still see a few warnings, though, but basic building and testing works.

Closed due to inactivity. You can try the latest version https://github.com/vadymmarkov/Rexy/releases/tag/0.7.0