Kitura / CloudEnvironment

Convenience Swift package for accessing environment variables, credentials.
Apache License 2.0
12 stars 16 forks source link

CloudConfiguration 2.x is not compatible with Swift 3.0.2 #22

Closed tunniclm closed 7 years ago

tunniclm commented 7 years ago

It would be nice if CloudConfiguration maintained some level of back-compatibility with Swift. For example, Kitura 1.7 works with Swift 3.0.2 and Swift 3.1.1.

Currently I am seeing the following error when compiling my project on Swift 3.0.2 when using CloudConfiguration 2.x:

/tmp/041ffec28bc23291ae0b059c3a2123aa393d3991/swiftserver/Packages/CloudFoundryEnv-4.0.2/Sources/CloudFoundryEnv/AppEnv.swift:184:23: error: use of unresolved identifier 'NSRegularExpression'
      let regex = try NSRegularExpression(pattern: spec, options: NSRegularExpression.Options.caseInsensitive)
                      ^~~~~~~~~~~~~~~~~~~
Foundation.RegularExpression:1:12: note: did you mean 'RegularExpression'?
open class RegularExpression : Foundation.NSObject, NSCopying, NSCoding {
           ^
/tmp/041ffec28bc23291ae0b059c3a2123aa393d3991/swiftserver/Packages/CloudFoundryEnv-4.0.2/Sources/CloudFoundryEnv/AppEnv.swift:184:67: error: use of unresolved identifier 'NSRegularExpression'
      let regex = try NSRegularExpression(pattern: spec, options: NSRegularExpression.Options.caseInsensitive)
                                                                  ^~~~~~~~~~~~~~~~~~~
Foundation.RegularExpression:1:12: note: did you mean 'RegularExpression'?
open class RegularExpression : Foundation.NSObject, NSCopying, NSCoding {
           ^
<unknown>:0: error: build had 1 command failures
tunniclm commented 7 years ago

Closing, this is really an issue with Swift-cfenv 4.x.