SwiftLint: Swiftlint 0.39 library not loaded
New Issue Checklist
- Updated SwiftLint to the latest version
- I searched for existing GitHub issues
Describe the bug
swiftlint always crashes after updating to version 0.39 via Homebrew. We’ve tried this on 3 systems and seen the same issue.
We have tried installing “Swift 5 Runtime Support for Command Line Tools” as per the known issues but the systems are too new to allow this to be installed.
We have downgraded to 0.38.2 which is working fine.
Complete output when running SwiftLint, including the stack trace and command used
$ swiftlint lint
dyld: Library not loaded: @rpath/lib_InternalSwiftSyntaxParser.dylib
Referenced from: /usr/local/bin/swiftlint
Reason: image not found
Abort trap: 6
Environment
-
SwiftLint version: 0.39
-
macOS versions: 10.15.3 && 10.14.6
-
Installation method used: Homebrew
-
Are you using nested configurations? If so, paste their relative paths and respective contents.
-
Which Xcode version are you using: 11.3
-
Do you have a sample that shows the issue? Run `swiftlint"
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 5
- Comments: 31 (1 by maintainers)
Commits related to this issue
- Temporarily remove all SwiftSyntax rules and support (#3107) The new rules introduced in 0.39.0 that depend on SwiftSyntax have been temporarily removed as we work out release packaging issues. * ... — committed to realm/SwiftLint by jpsim 4 years ago
- Add ability to bundle dylibs into CLI binary and load at startup Adding SwiftSyntax to the generator requires the dylib `_InternalSwiftSyntaxParser` which is normally bundled as part of the Xcode too... — committed to andrewchang-bird/mockingbird by andrewchang-bird 4 years ago
- Add ability to bundle dylibs into CLI binary and load at startup Adding SwiftSyntax to the generator requires the dylib `_InternalSwiftSyntaxParser` which is normally bundled as part of the Xcode too... — committed to andrewchang-bird/mockingbird by andrewchang-bird 4 years ago
- Add ability to bundle dylibs into CLI binary and load at startup Adding SwiftSyntax to the generator requires the dylib `_InternalSwiftSyntaxParser` which is normally bundled as part of the Xcode too... — committed to andrewchang-bird/mockingbird by andrewchang-bird 4 years ago
Unfortunately not possible. In order to get a tool that is portable (working on a different machine than it was built with) you need to copy
lib_InternalSwiftSyntaxParser.dyliband have it alongside the tool. And the tool’s rpaths should be able to find it relative to itself.This broke my team’s CI build. We resolved the issue for the time being by locking our Swiftlint version to 0.38.2 in our podfile.