[swift-corelibs-dev] Better integration with UNIX tools

2017-11-16 Thread Abhi Beckert via swift-corelibs-dev
Swift is a great shell scripting language except for it's lack of any API to execute UNIX commands. Compare these two shell scripts: > #!/usr/bin/php > > $files = `find ~/Desktop -name *.png`; > > foreach (explode("\n", $files) as $file) { > // do something with $file > } - >

Re: [swift-corelibs-dev] Encountering "Constant strings cannot be deallocated"

2017-11-16 Thread Brandon Williams via swift-corelibs-dev
Oops, sorry, hit send too early! The docker file Im using can be seen here: https://github.com/pointfreeco/swift-web/blob/bb-travis/Dockerfile Which is this template: https://github.com/swiftdocker/docker-swift/blob/5c83628d4696bca62aec3136a4ee9b854e8d548e/4.0/Dockerfile So not using any of

Re: [swift-corelibs-dev] Encountering "Constant strings cannot be deallocated"

2017-11-16 Thread Brandon Williams via swift-corelibs-dev
Ah, sorry for now providing more info! So the docker file that I am using to run the tests can be see here: On Thu, Nov 16, 2017 at 5:43 PM Philippe Hausler wrote: > Is this with a recent build? Do you know what commit the > swift-corelibs-foundation is from? That might

Re: [swift-corelibs-dev] Encountering "Constant strings cannot be deallocated"

2017-11-16 Thread Philippe Hausler via swift-corelibs-dev
Is this with a recent build? Do you know what commit the swift-corelibs-foundation is from? That might help nail down what is going on here. > On Nov 16, 2017, at 2:41 PM, Brandon Williams via swift-corelibs-dev > wrote: > > Hello! I have a test case that when

[swift-corelibs-dev] Encountering "Constant strings cannot be deallocated"

2017-11-16 Thread Brandon Williams via swift-corelibs-dev
Hello! I have a test case that when run on Linux somehow encounters the "Constant strings cannot be deallocated” fatal error thrown in NSCFString.swift, as seen here: https://github.com/apple/swift-corelibs-foundation/blob/master/Foundation/NSCFString.swift#L118 The test that does it is here:

Re: [swift-corelibs-dev] PropertyListDecoder/Encoder?

2017-11-16 Thread Luke Howard via swift-corelibs-dev
https://github.com/apple/swift-corelibs-foundation/pull/1237 May/may not be useful - unfortunately couldn’t get it working on Linux so had to close. Sent from my iPhone > On 16 Nov 2017, at 21:18, Kevin Lundberg via swift-corelibs-dev > wrote: > > Thank you! I

Re: [swift-corelibs-dev] PropertyListDecoder/Encoder?

2017-11-16 Thread Kevin Lundberg via swift-corelibs-dev
Thank you! I found this shortly before your message, and I’m working on that right now in my project (and it is definitely not a simple copy paste but so far it seems manageable). -- Kevin Lundberg > On Nov 16, 2017, at 4:12 PM, Ian Partridge wrote: > > Hi Kevin, > >

Re: [swift-corelibs-dev] PropertyListDecoder/Encoder?

2017-11-16 Thread Ian Partridge via swift-corelibs-dev
Hi Kevin, It's unintentional, in the sense that noone has done the work yet to implement the PropertyListDecoder in corelibs-foundation. However, the Darwin implementation is actually open source - see https://github.com/apple/swift/blob/master/stdlib/public/SDK/Foundation/PlistEncoder.swift -

[swift-corelibs-dev] PropertyListDecoder/Encoder?

2017-11-16 Thread Kevin Lundberg via swift-corelibs-dev
I’m trying to port some mac/iOS swift code over to also compile and run on linux. However one of the files I’m working with references PropertyListDecoder in order to decode some propertylist data we have in our library, and it’s failing to compile since PropertyListDecoder doesn’t appear to be

Re: [swift-corelibs-dev] SR-6405: URLRequest does not capitalise HTTP methods

2017-11-16 Thread Stephen Celis via swift-corelibs-dev
> On Nov 16, 2017, at 3:30 PM, Ian Partridge wrote: > >> Is the Foundation test suite run against both implementations to attempt to >> catch these kinds of things? >> If not it would seem like a big win to do so. > > Not yet, but there is work underway to do this. See >

Re: [swift-corelibs-dev] SR-6405: URLRequest does not capitalise HTTP methods

2017-11-16 Thread Ian Partridge via swift-corelibs-dev
On 16 November 2017 at 17:41, Stephen Celis wrote: > Brandon Williams and I have come across a lot of inconsistencies between > Foundations in our Swift web work. We’ve been trying to file bugs when we > remember to, but I’m curious if there’s a better way to catch

Re: [swift-corelibs-dev] SR-6405: URLRequest does not capitalise HTTP methods

2017-11-16 Thread Stephen Celis via swift-corelibs-dev
> On Nov 16, 2017, at 2:57 PM, Alex Blewitt wrote: > > I understood your question, but I can only point to you as to what is > available and run on the swift-corelibs-foundation open source project. Sorry to continue on this train (especially since it’s a big of a

Re: [swift-corelibs-dev] SR-6405: URLRequest does not capitalise HTTP methods

2017-11-16 Thread Alex Blewitt via swift-corelibs-dev
> On 16 Nov 2017, at 19:14, Stephen Celis wrote: > >> On Nov 16, 2017, at 2:02 PM, Alex Blewitt wrote: >> >> There is a TestFoundation target in the swift-corelibs-foundation project, >> which can allow the tests to be run against the open source

Re: [swift-corelibs-dev] SR-6405: URLRequest does not capitalise HTTP methods

2017-11-16 Thread Stephen Celis via swift-corelibs-dev
> On Nov 16, 2017, at 2:02 PM, Alex Blewitt wrote: > > There is a TestFoundation target in the swift-corelibs-foundation project, > which can allow the tests to be run against the open source codebase. Sorry, maybe I wasn’t clear, I was wondering if there’s a test suite that

Re: [swift-corelibs-dev] SR-6405: URLRequest does not capitalise HTTP methods

2017-11-16 Thread Alex Blewitt via swift-corelibs-dev
There is a TestFoundation target in the swift-corelibs-foundation project, which can allow the tests to be run against the open source codebase. Note that there's no requirement for the methods to be capitalised in URLRequest. Chances are that the implementation is such that there are some