IBDecodable / IBLinter

A linter tool for Interface Builder
MIT License
950 stars 40 forks source link

Fatal error : Failed to update packages #55

Closed acevif closed 5 years ago

acevif commented 5 years ago

Hello,

I've experienced this error when I run iblinter installed with CocoaPods from the command line.

Is this expected behavior?

$ ./Pods/IBLinter/bin/iblinter lint
Fatal error: 'try!' expression unexpectedly raised an error: đź’Ą  Failed to compile script: file /BuildRoot/Library/Caches/com.apple.xbs/Sources/swiftlang/swiftlang-902.0.48/src/swift/stdlib/public/core/ErrorType.swift, line 184
zsh: illegal hardware instruction  ./Pods/IBLinter/bin/iblinter lint
❌️ ERROR 132

my environment:

Any help would be highly appreciated.

Thanks.


Postscript

I've noticed this error occurs after I run iblinter edit

$ ./Pods/IBLinter/bin/iblinter edit
Fatal error: 'try!' expression unexpectedly raised an error: đź’Ą  Failed to update packages
👉  Make sure you have write permissions to the folder '/path/to/my/git/repository/.iblinter-tmp/Packages/': file /BuildRoot/Library/Caches/com.apple.xbs/Sources/swiftlang/swiftlang-902.0.48/src/swift/stdlib/public/core/ErrorType.swift, line 184
zsh: illegal hardware instruction  ./Pods/IBLinter/bin/iblinter edit
kateinoigakukun commented 5 years ago

@acevif I’m sincerely sorry. This is happened by using Swift 4.2. Swift doesn’t have ABI stability yet. Therefore libIBLinter.dylib used for IBLinter runtime can’t work with Swift4.2 because it’s compiled by Swift4.1. The plugin feature was too early and will be removed before long. If you don’t need custom rule, simply remove your IBLinterFile.swift to work out. In the case you need custom rule, please fork this repository and add rule or send pull request🙇‍♂️.

(I’m planning to implement plugin feature in other way. )

acevif commented 5 years ago

@kateinoigakukun Thanks kateinoigakukun-san.

It looks like custom rules and plugins are too early for me. I will use built-in rules for the time being.

Thank you very much for your nice tool.