bow-swift / bow

🏹 Bow is a cross-platform library for Typed Functional Programming in Swift
https://bow-swift.io
Other
643 stars 32 forks source link

Linux #591

Closed miguelangel-dev closed 4 years ago

miguelangel-dev commented 4 years ago

Related issues

Goal

This PR makes compatible Bow library with Linux, completing the cross-platform compatibility:

Implementation details

Remove dependency to __dispatch_queue_get_label, it is not available on Linux. Also, this calling can arbitrarily crash the app because it is an insecure call to DispatchQueue, try to get the label from already-dead queue.

Testing details

You can generate the whole module-tests compatible with Linux, running from macOS:

$ swift test --generate-linuxmain

After, go to Linux and using this auto-generated tests code, run (in root folder):

$ swift test

Screen Shot 2020-04-27 at 10 52 26

Future work

In a different PR, I will add a workflow step to check Linux won't be broken, and it keeps the compatibility with this platform.

References