mockingbird icon indicating copy to clipboard operation
mockingbird copied to clipboard

Support for Linux

Open pdesjardins90 opened this issue 2 years ago • 3 comments

New Feature Request Checklist

Overview

I'm trying to setup a Swift project on Linux and the setup instructions the documentation provide are not working.

After a brief investigation, I found that the mockingbird generate command relies heavily on macOS utilities like /usr/libexec/PlistBuddy and xcrun.

I managed to skip these utility calls by setting the MKB_VERSION and MKB_NO_VERIFY environment variables but the .build/checkouts/mockingbird/bin/0.20.0/mockingbird binary still fails with the following message:

cannot execute binary file: Exec format error

Is there another way to install and run the package on linux that already exists but is not documented?

If not, what work would be required to add full linux support?

pdesjardins90 avatar Feb 13 '22 23:02 pdesjardins90

I have a pending branch that adds Linux compatibility for the generator here: https://github.com/birdrides/mockingbird/tree/dev/andrewchang-bird/add-linux-compat

Right now it’s only tested on CentOS 8 but it’ll likely work for all distros. The biggest change is swapping out OperationQueue (which isn’t yet supported on all platforms that Foundation targets) with a custom action graph runner that uses GCD directly, although I’ve been contemplating moving to Swift concurrency just for future proofing and performance.

Note that this branch doesn’t add Linux compatibility to the runtime testing framework, although I think the only real change should be gating platform-specific imports. If you have bandwidth to contribute on that front it’d be much appreciated.

I’m targeting the 0.21 or 0.22 release with the generator changes.

andrewchang-bird avatar Feb 14 '22 03:02 andrewchang-bird

I'll look into it!

pdesjardins90 avatar Feb 14 '22 15:02 pdesjardins90

Is this still planned on being released in the near future? Thanks!

ramonschriks avatar Jul 08 '22 11:07 ramonschriks