What Illegal instruction: means?
I get:
swiftformat --indentcase true .
running swiftformat...
Illegal instruction: 4
@o-zaporozhchenko it means swiftformat crashed (it's not supposed to do that).
That probably means it choked on one of your source files - I'd appreciate if you could work out which file it was and send me a copy :-)
@o-zaporozhchenko out of curiosity, what OS version are you running on?
@o-zaporozhchenko if you run swiftformat with the --verbose option, it might help to isolate the file that crashed.
@nicklockwood 10.13.6 High Sierra
@nicklockwood so i did investigation:
It crash even with no options. just swiftformat /path
Minimal piece code that breaks swiftformat is:
import Foundation
struct SomeModel {
init(uid: String
// someCommentedProperty:[String:Any?]?,
// value:Int?,
) {
self.uid = uid
}
}
I suppose, commented multiple properties cause the problem there
// someCommentedProperty:[String:Any?]?,
// value:Int?,
@nicklockwood Hope u can fix it.
Also, i've seen version in homebrew is lower than on github source page.
Would be nice to update it :)
0.35.9 on github and 0.35.7 installed via homebrew
@o-zaporozhchenko thanks for investigating - I can reproduce it with the code you've given me, so I'll get that fixed asap.
The version on homebrew is listed as 0.35.9 (https://github.com/Linuxbrew/homebrew-core/blob/master/Formula/swiftformat.rb) - did you try brew update?
@nicklockwood
oh, i found that brew update makes
touch: /usr/local/Homebrew/.git/FETCH_HEAD: Permission denied
and others problems
and
sudo brew update is forbidden now
xD
@o-zaporozhchenko this crash is fixed in version 0.35.10
Most helpful comment
@o-zaporozhchenko this crash is fixed in version 0.35.10