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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Swift 4.1 branch on Linux #169

Merged
merged 2 commits into from Apr 21, 2018

Conversation

3 participants
@sunshinejr
Collaborator

sunshinejr commented Apr 21, 2018

Hey! This should help in #161 with Linux tests.

You might think "What better to do than spend the Friday night debugging Swift on Linux, eh?" -and you're absolutely right. I spent some time debugging the issue with Linux tests and I narrowed it down to one line. Try to run this line in your REPL:

NSData(contentsOfFile: "https://raw.githubusercontent.com/JohnSundell/MarathonTestScriptWithDependencies/master/Script.swift", options: .alwaysMapped)

And you should see something similar to:
zrzut ekranu 2018-04-21 o 01 59 34

So the problem is that for some reason we can't fetch the data from the interwebz using Foundation on Linux. The error suggests that the reason should be in this file, possible in this function. I didn't really have time for a bigger investigation but probably radar or issue or (even a fix) should be filled.

The solution, for now, is to use wget -O fileName fileUrl. I've checked both tests on macOS and Ubuntu 17~ and it looks good, but we'll see how the CI reacts 馃槃

Let me know what do you think about this one ;-)

@orta

orta approved these changes Apr 21, 2018

I'm impressed 馃憤

@JohnSundell

I'm impressed too 馃憤 Thanks a lot for this @sunshinejr, what a strange reason, almost seems like a bug in Linux' implementation of Data. But CI seems to be happy (finally! 馃槄) so I'm happy 馃槂

@JohnSundell JohnSundell merged commit 018e363 into JohnSundell:swift-4.1 Apr 21, 2018

2 checks passed

buddybuild: Marathon (iOS, MarathonCore - Debug) Build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment