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

Illegal instruction: 4 when running beak commands #14

Closed
Jeehut opened this issue Feb 18, 2018 · 4 comments
Closed

Illegal instruction: 4 when running beak commands #14

Jeehut opened this issue Feb 18, 2018 · 4 comments

Comments

@Jeehut
Copy link

Jeehut commented Feb 18, 2018

Hi, I just wrote me a script to update a spreadsheet on a vocabulary learning site. I edited the file within Xcode by running beak edit, but the problem is that after writing some code the commands beak edit, beak list and beak run all didn't work.

As a workaround what I'm doing right now is to comment out all code below the import statements with an editor like Atom, then I run beak edit (which then works fine) and then I uncomment the lines again in Xcode. When I run the Beakfile scheme within Xcode everything just works fine, so I can somehow use the script. But I would rather use things as designed: from the command line. :)

Here's the entire content of my beak.swift file:
https://gist.github.com/Dschee/3c4b89ef9da39ab7714c47fa97dc4cae

And this is the error I get when running any beak commands:

Illegal instruction: 4

I'm using beak 0.3.1 on macOS 10.13.3 with Xcode 9.2.

Any ideas why this happens? The error code doesn't really help ...

@Jeehut Jeehut changed the title Getting Illegal instruction: 4 when running any beak command Illegal instruction: 4 when running beak commands Feb 18, 2018
@Jeehut
Copy link
Author

Jeehut commented Feb 23, 2018

@yonaskolb Any idea why this happens?

@yonaskolb
Copy link
Owner

Hi @Dschee
Thanks for opening this. I tracked this down and fixed it in #15 👍
The issue was the recordMapper closure and how SourceKit parses that. I've made checks around that, and also added a more descriptive error if something like that happens again

@yonaskolb
Copy link
Owner

Fixed in 0.3.2

@Jeehut
Copy link
Author

Jeehut commented Feb 25, 2018

Thank you very much, it's working great now! 👍

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

No branches or pull requests

2 participants