docopt.swift
docopt.swift copied to clipboard
Linux Build
NB This is work in progress. It incorporates the changes from #12 and #13 so it would make sense to review/merge them first. I've changed the project layout slightly so the Cocoapods file may need tweaking.
Changes to build on Linux:
- removed use of
@objc - removed lots of casting to
AnyObject, in favour of just usingAny - added a basic mechanism for matching dictionaries without
NSObject - removed other cases of reliance on
NSObject/NSValue/etc - changed project layout to match SwiftPM's default expectations
- added
LinuxMain.swiftfor tests and hooked it up to the existing tests
That looks great, massive thanks for the effort!
One thing I'm concerned about is Objective-C support, which this PR is dropping in favor of Linux. I'll think about it and get back to you.
Another thing - if we decide that Linux is the way to go, then travis ci should also run tests on Linux. Do you think they support swift on Linux by now?
One thing I'm concerned about is Objective-C support, which this PR is dropping in favor of Linux. I'll think about it and get back to you.
Ah, hmm - I wasn't specifically intending to drop Obj-C support, but of course I did. Is there an existing Obj-C port of Docopt? I suppose I'd say that if people are working in a mixed environment they should use that (if it exists), and that this one should aim to be a pure-Swift one. I can see though that it's hard to please everyone :)
Another thing - if we decide that Linux is the way to go, then travis ci should also run tests on Linux. Do you think they support swift on Linux by now?
Funnily enough I'm in the process of figuring this out at the moment for one of my other packages. It looks like it works with a bit of tweaking. I'll update #14 when I've got it going.
Unfortunately, I don't know any obj-c compatible ports of docopt. On the other hand, I think it would be fair to say that version 0.6.6 is the last that supports objective-c. And obj-c compatible version will still be available to download and use.
Again, thanks a lot for the effort, I really appreciate it!
@samdeane tests on Linux are failing even tough travis reports a success.
Hmm. Looks like the final run did pass, although there are some warnings. I'll see if I can stomp them. There seems to be a subtle difference between the Mac and Linux compilers that I'm testing with, probably because the Linux one is a development snapshot.
Perhaps this project needs to be split, having the ObjC one in another repo?