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

Add Swift 5.1 support on Linux #85

Merged
merged 7 commits into from
Dec 14, 2019
Merged

Conversation

ellneal
Copy link
Member

@ellneal ellneal commented Dec 9, 2019

Uses the FoundationNetworking module where available.

Copy link
Member

@f-meloni f-meloni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this, I was actually working on exactly the same thing given this is the last think I think was missing for my PR danger/swift#275
I think though that canImport was implemented from swift 4.1, and if I remember correctly xcode 9.2 doesn't have it, then you will probably have to check the swift version before using the canImport

@ellneal
Copy link
Member Author

ellneal commented Dec 9, 2019

@f-meloni I actually did this to get my fork of danger building on linux with Swift 5.1 (and you're right that this is the last thing missing) 😂

I was going to wrap these in #if os(Linux) but thought it could get a bit ugly, so was waiting for feedback from the maintainers before making it even uglier 😄

@f-meloni
Copy link
Member

f-meloni commented Dec 9, 2019

I think #if os(Linux) would not work because swift doesn't have FoundationNetworking before swift 5.1

@JosephDuffy
Copy link
Member

JosephDuffy commented Dec 10, 2019

I have opened ellneal#1, which adds the #if swift(>=4.1) check.

Another option could be to drop Xcode 9.2?

Swift 4.1 (which is when canImport was introduced) requires Xcode 9.3, but it could also be argued that only Xcode 10 and Xcode 11 are to be supported (last 2 major versions).

@pietbrauer
Copy link
Member

I would rather support iOS versions than Xcode versions. I think it’s ok to support only iOS 10, 11 and 12.

@ellneal
Copy link
Member Author

ellneal commented Dec 10, 2019

Switching to Xcode 11 has just created a hang when installing gems. I'll look into it when I have some free time.

@pietbrauer
Copy link
Member

Maybe you can take a hint from RequestKit as we are on 10.2 “already”. I also have an open pull request which is failing for a different reason using Xcode 11.2

https://github.com/nerdishbynature/RequestKit

@ellneal
Copy link
Member Author

ellneal commented Dec 10, 2019

I have actually managed to get all the tests to pass now, but it’s timing out when attempting to lint the pod spec 🤦‍♂️

@pietbrauer
Copy link
Member

Yes, so same as on RequestKit. Maybe disable it for now and open an issue so we can move on?

@ellneal
Copy link
Member Author

ellneal commented Dec 11, 2019

@pietbrauer it looks to me as if this is all controlled from the nerdishbynature/requestkit_fastlane repository. My experience with Fastlane is entirely contained within the commits in this PR, so I'm not sure I'm the best person for the job 😅

@ellneal
Copy link
Member Author

ellneal commented Dec 14, 2019

I've managed to disable the pod spec lint step by removing the DEPLOY_PODSPEC environment variable 🎉

Copy link
Member

@pietbrauer pietbrauer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sweet! Nice job!

@pietbrauer pietbrauer merged commit 9ad4d6e into nerdishbynature:master Dec 14, 2019
@ellneal
Copy link
Member Author

ellneal commented Dec 14, 2019

@pietbrauer No worries 😁 Can you tag a new release? I'll open an issue to re-enable the podspec linting 👍

@ellneal ellneal mentioned this pull request Dec 14, 2019
@f-meloni
Copy link
Member

Yeah a new release would be great 🚀

@pietbrauer
Copy link
Member

@ellneal @f-meloni Done

tngranados pushed a commit to tngranados/octokit.swift that referenced this pull request Jul 13, 2022
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.

4 participants