vapor-community / sockets

🔌 Non-blocking TCP socket layer, with event-driven server and client.
MIT License
575 stars 54 forks source link

Make all of the SocksCoreExample* optional or move to example folders #62

Closed proyb6 closed 8 years ago

proyb6 commented 8 years ago

Will need to simplify the dependencies when compiling Vapor and move those "example" to a separate folder will helps to reduce compiling time if that is not need.

In macOS 10.11.6 beta Error on Xcode 8 beta with Toolchain on Swift June 20.

Compile Swift Module 'libc' (1 sources)
/Users/yanli/Downloads/vapor-0.13.0/Packages/Socks-0.8.1/Sources/SocksCore/Address.swift:94:45: warning: missing '.self' for reference to metatype of type 'sockaddr_in'
        case .inet: return socklen_t(sizeof(sockaddr_in))
                                            ^
                                                       .self
/Users/yanli/Downloads/vapor-0.13.0/Packages/Socks-0.8.1/Sources/SocksCore/Address.swift:95:46: warning: missing '.self' for reference to metatype of type 'sockaddr_in6'
        case .inet6: return socklen_t(sizeof(sockaddr_in6))
                                             ^
                                                         .self
/Users/yanli/Downloads/vapor-0.13.0/Packages/Socks-0.8.1/Sources/SocksCore/Address.swift:175:39: warning: missing '.self' for reference to metatype of type 'sockaddr_storage'
        var length = socklen_t(sizeof(sockaddr_storage))
                                      ^
                                                      .self
/Users/yanli/Downloads/vapor-0.13.0/Packages/Socks-0.8.1/Sources/SocksCore/Address.swift:188:39: warning: missing '.self' for reference to metatype of type 'sockaddr_storage'
        var length = socklen_t(sizeof(sockaddr_storage))
                                      ^
                                                      .self
/Users/yanli/Downloads/vapor-0.13.0/Packages/Socks-0.8.1/Sources/SocksCore/SocketOptions.swift:132:76: warning: missing '.self' for reference to metatype of type 'T'
        guard setsockopt(descriptor, level, name, &val, socklen_t(strideof(T))) != -1 else {
                                                                           ^
                                                                            .self
/Users/yanli/Downloads/vapor-0.13.0/Packages/Socks-0.8.1/Sources/SocksCore/SocketOptions.swift:138:41: warning: missing '.self' for reference to metatype of type 'T'
        var length = socklen_t(strideof(T))
                                        ^
                                         .self
/Users/yanli/Downloads/vapor-0.13.0/Packages/Socks-0.8.1/Sources/SocksCore/SocketOptions.swift:145:81: warning: missing '.self' for reference to metatype of type 'T'
            throw Error(.optionGetFailed(level: level, name: name, type: String(T)))
                                                                                ^
                                                                                 .self
/Users/yanli/Downloads/vapor-0.13.0/Packages/Socks-0.8.1/Sources/SocksCore/TCPSocket.swift:146:39: warning: missing '.self' for reference to metatype of type 'sockaddr_storage'
        var length = socklen_t(sizeof(sockaddr_storage))
                                      ^
                                                      .self
/Users/yanli/Downloads/vapor-0.13.0/Packages/Socks-0.8.1/Sources/SocksCore/UDPSocket.swift:48:39: warning: missing '.self' for reference to metatype of type 'sockaddr_storage'
        var length = socklen_t(sizeof(sockaddr_storage))
                                      ^
                                                      .self
Compile Swift Module 'Socks' (5 sources)
Compile Swift Module 'SocksCoreExampleTCPServer' (1 sources)
Compile Swift Module 'SocksCoreExampleTCPClient' (1 sources)
Compile Swift Module 'SocksExampleUDPServer' (1 sources)
Compile Swift Module 'SocksExampleUDPClient' (1 sources)
Compile Swift Module 'SocksExampleTCPServer' (1 sources)
Compile Swift Module 'SocksExampleTCPClient' (1 sources)
Compile Swift Module 'SocksCoreExampleTCPKeepAliveServer' (1 sources)
Linking .build/release/SocksCoreExampleTCPClient
ld: unexpected token: !tapi-tbd-v2 file '/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/lib/libobjc.tbd' for architecture x86_64
Linking .build/release/SocksCoreExampleTCPServer
Linking .build/release/SocksExampleUDPClient
ld: unexpected token: !tapi-tbd-v2 file '/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/lib/libobjc.tbd' for architecture x86_64
Linking .build/release/SocksExampleUDPServer
ld: unexpected token: !tapi-tbd-v2 file '/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/lib/libobjc.tbd' for architecture x86_64
ld: unexpected token: !tapi-tbd-v2 file '/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/lib/libobjc.tbd' for architecture x86_64
<unknown>:0: error: build had 4 command failures
error: exit(1): /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2016-06-20-a.xctoolchain/usr/bin/swift-build-tool -f /Users/yanli/Downloads/vapor-0.13.0/.build/release.yaml
czechboy0 commented 8 years ago

Hi @proyb6, is this two separate issues? To me it looks like a compilation issue (I'll take a look into it), and also a request to move the example binaries. Could you please create a separate issue for each so that we can more easily focus the conversation? Thanks 😊

tanner0101 commented 8 years ago

Relevant:

SwiftPM Target Access Control

https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160704/023659.html https://github.com/aciidb0mb3r/swift-evolution/blob/swiftpm-module-access-control/proposals/xxxx-swiftpm-target-access-control.md

hpux735 commented 8 years ago

What changed to get past the !tapi-tbd-v2 error?

I updated Socks, and it went away, but later on in my project I'm getting it in final link What an annoying error! There's practically nothing google knows about it, other than this thread.