Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux Build #14

Open
wants to merge 20 commits into
base: master
Choose a base branch
from
Open

Linux Build #14

wants to merge 20 commits into from

Conversation

samdeane
Copy link
Contributor

@samdeane samdeane commented Mar 8, 2018

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 using Any
  • 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.swift for tests and hooked it up to the existing tests

@kovpas kovpas self-requested a review March 9, 2018 20:51
@kovpas
Copy link
Contributor

kovpas commented Mar 9, 2018

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?

@samdeane
Copy link
Contributor Author

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.

# Conflicts:
#	Sources/Docopt/Docopt.swift
@kovpas
Copy link
Contributor

kovpas commented Mar 10, 2018

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!

Not quite sure what's going on here - I thought I was testing with Swift 4.1 on both platforms, but it appears not...
@kovpas
Copy link
Contributor

kovpas commented Mar 11, 2018

@samdeane tests on Linux are failing even tough travis reports a success.

@samdeane
Copy link
Contributor Author

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.

@lf-araujo
Copy link

Perhaps this project needs to be split, having the ObjC one in another repo?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants