PureSwift / SwiftFoundation

Cross-Platform, Protocol-Oriented Programming base library to complement the Swift Standard Library. (Pure Swift, Supports Linux)
MIT License
625 stars 52 forks source link

'POSIXError' does not conform to 'ErrorType' #20

Closed madhavajay closed 8 years ago

madhavajay commented 8 years ago

I get this error when trying to compile on OSX with the latest swift 2.2 dec 31 snapshot.

Compiling Swift Module 'SwiftFoundation' (51 sources) /SwiftFoundationExample/Packages/SwiftFoundation-1.1.0/Sources/SwiftFoundation/POSIXFileSystemStatus.swift:28:45: error: thrown expression type 'POSIXError' does not conform to 'ErrorType' throw POSIXError.fromErrorNumber!

colemancda commented 8 years ago

Building from Xcode with Carthage is the only supported method on Apple platforms. SPM is only supported for Linux.

colemancda commented 8 years ago

But, you're open to create a PR with the necessary changes, its just not one of my goals to support the SPM for OS X.

madhavajay commented 8 years ago

Okay, are you able to point me in any directions to figure it out, I assume its missing Darwin or something? Sorry i'm a Swift Open Source n00b but keen to get involved.

colemancda commented 8 years ago

Just clone the git repo, then open the .xcodeproj and compile.

madhavajay commented 8 years ago

No, for fixing SPM support on OSX. Any idea it fails on the posix error? I assume its because it needs Darwin for POSIX support?

colemancda commented 8 years ago

Either missing Darwin, or make it conform with a extension PosixError: ErrorType { }

madhavajay commented 8 years ago

Okay cool thanks ill have a play around and if I can get it working ill make a PR. :)