`Illegal instruction: 4` when running beak commands
Jeehut opened this issue · comments
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 ...
@yonaskolb Any idea why this happens?
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
Fixed in 0.3.2
Thank you very much, it's working great now! 👍