SwiftLint: Swiftlint 0.39 library not loaded

New Issue Checklist

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

Most upvoted comments

Ideally we’d statically link lib_InternalSwiftSyntaxParser, but maybe that’s not possible?

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.dylib and 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.