3lvis / Networking

Swift HTTP Networking with stubbing and caching support
MIT License
1.36k stars 112 forks source link

First batch of linux changes! #225

Closed codeOfRobin closed 4 years ago

codeOfRobin commented 6 years ago

🚨🚨🚨🚨🚨DO NOT MERGE QUITE YET; ONLT FOR DISCUSSION🚨🚨🚨🚨🚨

Hey Elvis!

Managed to finally setup a half decent environment for testing stuff out on Linux.

Good news: Most stuff will probably still work (I've tested URLSession on Linux, and it works really well)

Bad news: Stuff like Image won't be supported.

I'm still dealing with compile-time issues because of Image and the like, and I was wondering - is it possible to extract out things like Image and Cache out into their own OS specific classes?

Cache should be easy to refactor out using something like Request Behaviours, not quite sure what to do about Image.

PS: If you wanna try this out locally, install Docker and run IBM's docker container: docker run -it --privileged --volume (pwd)":/package" ibmcom/swift-ubuntu:4.0.3 /bin/bash. This'll log you into a shell and you'll be able to run swift build

3lvis commented 6 years ago

Looks like it didn't take much code. Interesting work, @codeOfRobin!

codeOfRobin commented 6 years ago

@3lvis isn't a lot of work at all 😅. Mostly just poking at the code until the compiler stops yelling at you 😂

3lvis commented 4 years ago

Closing since it's gonna be hard maintaining something that I have no plans on using, sorry Robin!