Re: [swift-corelibs-dev] KVC dependent classes

2016-03-15 Thread David Hart via swift-corelibs-dev
Sorry, I said NSProgress but I meant NSPredicate. I personally can't even imagine what a alternative API for NSPredicate would look like 🤔 > On 15 Mar 2016, at 00:21, Tony Parker wrote: > > Hi David, > > It’s likely that we’ll have to come up with some alternative API in these > cases. For ex

Re: [swift-corelibs-dev] NSURLSession & libcurl

2016-03-15 Thread Daniel Eggert via swift-corelibs-dev
Is it ok for me to split the libcurl specific code inside Foundation into a separate file, say NSURLSession+curl.swift ? Or should I try to keep everything inside NSURLSession.swift ? If I go for a separate file, I'd be able to differentiate between internal and private for the helpers. I'll en

[swift-corelibs-dev] Internal Tests

2016-03-15 Thread Daniel Eggert via swift-corelibs-dev
Is it ok to use @testable import SwiftFoundation in tests? I'd like to test some internal code. TestNSXMLDocument.swift uses this, but not on Linux. What's the reason for this? /Daniel ___ swift-corelibs-dev mailing list swift-corelibs-dev@swift.or

Re: [swift-corelibs-dev] NSURLSession & libcurl

2016-03-15 Thread Philippe Hausler via swift-corelibs-dev
That seems pretty reasonable to me, I guess the only thing to watch out for is private vs internal. Sent from my iPhone > On Mar 15, 2016, at 2:44 AM, Daniel Eggert wrote: > > Is it ok for me to split the libcurl specific code inside Foundation into a > separate file, say NSURLSession+curl.sw

Re: [swift-corelibs-dev] Internal Tests

2016-03-15 Thread Robert Stephen Thompson via swift-corelibs-dev
If it doesn’t use it on Linux, it’s because I was mostly running tests in Xcode heh, and didn’t end up needing it in the end. On Linux, of course, I think you’d want @testable import Foundation. I’m not an Apple guy, though, I just happen to be the guy who wrote TestNSXMLDocument.swift! So if th

[swift-corelibs-dev] Cannot call CFStreamCreatePairWithSocket on Linux

2016-03-15 Thread Pushkar N Kulkarni via swift-corelibs-dev
Hello all,  While attempting a simple Swift client-server program on Linux using CFSocket, I tried to create CFReadStream and CFWriteStream instances using CFStreamCreatePairWithSocket(_:_:_:_). The program compiles and links but it crashes with this:2016-03-15 10:30:17.791 Client[21389:5a501740] C

Re: [swift-corelibs-dev] Cannot call CFStreamCreatePairWithSocket on Linux

2016-03-15 Thread Philippe Hausler via swift-corelibs-dev
You are correct, those symbols are from CFNetwork which are not yet implemented on linux targets. CFStream is implemented but CFSocketStream is not implemented in swift-corelibs-foundation. It could be technically reasonable to port the open source (very old) CFNetwork to linux. However I am fai

Re: [swift-corelibs-dev] Cannot call CFStreamCreatePairWithSocket on Linux

2016-03-15 Thread Pushkar N Kulkarni via swift-corelibs-dev
Just to add to that:I am wondering if this would hamper the implementation of NSStream, NSInputStream and NSOutputStream for Linux.Pushkar N Kulkarni, IBM RuntimesSimplicity is prerequisite for reliability - Edsger W. Dijkstra -Pushkar N Kulkarni/India/IBM wrote: -To: swift-corelibs-dev@swi

Re: [swift-corelibs-dev] Internal Tests

2016-03-15 Thread Tony Parker via swift-corelibs-dev
Using @testable makes sense to me. Let's try it out. - Tony > On Mar 15, 2016, at 7:54 AM, Robert Stephen Thompson via swift-corelibs-dev > wrote: > > If it doesn’t use it on Linux, it’s because I was mostly running tests in > Xcode heh, and didn’t end up needing it in the end. On Linux, of

[swift-corelibs-dev] Wrong type in NSHTTPURLResponse

2016-03-15 Thread Daniel Eggert via swift-corelibs-dev
The allHeaderFields in public class NSHTTPURLResponse : NSURLResponse { [...] public let allHeaderFields: [NSObject : AnyObject] } should have been [String : String] The initialiser has the correct [String : String] type, though. Somehow Apple missed this in their API, too. What's the p

Re: [swift-corelibs-dev] Cannot call CFStreamCreatePairWithSocket on Linux

2016-03-15 Thread Tony Parker via swift-corelibs-dev
Hi Pushkar, Yes, this is used by “getStreamsToHostWithName”. I think we’ll have to come up with a replacement implementation here, either by starting with the old CFNetwork open source code or writing our own. - Tony > On Mar 15, 2016, at 8:00 AM, Pushkar N Kulkarni via swift-corelibs-dev >

Re: [swift-corelibs-dev] Wrong type in NSHTTPURLResponse

2016-03-15 Thread Daniel Eggert via swift-corelibs-dev
On 15 Mar 2016, at 16:16, Daniel Eggert via swift-corelibs-dev wrote: > > The allHeaderFields in > > public class NSHTTPURLResponse : NSURLResponse { >[...] >public let allHeaderFields: [NSObject : AnyObject] > } > > should have been [String : String] > > The initialiser has the corre

Re: [swift-corelibs-dev] Wrong type in NSHTTPURLResponse

2016-03-15 Thread Tony Parker via swift-corelibs-dev
Unfortunately the ObjC API doesn’t use generics for its dictionary: @property (readonly, copy) NSDictionary *allHeaderFields; So we need to get this fixed on Darwin Foundation first. I filed a bug to track this internally. - Tony > On Mar 15, 2016, at 10:42 AM, Daniel Eggert via swift-corelibs

Re: [swift-corelibs-dev] Cannot call CFStreamCreatePairWithSocket on Linux

2016-03-15 Thread Max Howell via swift-corelibs-dev
For interests sake, how come it could link? > You are correct, those symbols are from CFNetwork which are not yet > implemented on linux targets. CFStream is implemented but CFSocketStream is > not implemented in swift-corelibs-foundation. It could be technically > reasonable to port the open s

Re: [swift-corelibs-dev] Cannot call CFStreamCreatePairWithSocket on Linux

2016-03-15 Thread Philippe Hausler via swift-corelibs-dev
CFNetwork is a separate dynamic library that is lazily loaded via dlopen. So we don’t need to have CFNetwork present to build. > On Mar 15, 2016, at 10:51 AM, Max Howell wrote: > > For interests sake, how come it could link? > >> You are correct, those symbols are from CFNetwork which are not

Re: [swift-corelibs-dev] Building Foundation in Xcode

2016-03-15 Thread Taylor Franklin via swift-corelibs-dev
Hey Brian, So I was able to get a toolchain for OSX and everything seemed to work. But now I'm trying to test my changes on Linux and it seems my changes are halting the tests when I run ninja test in the Foundation directory. I began this discussion on a pull request