Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal error running swiftlint rules on Xcode 11 and MacOS Catalina #2789

Closed
2 tasks done
samyanez94 opened this issue Jul 1, 2019 · 2 comments
Closed
2 tasks done

Comments

@samyanez94
Copy link

New Issue Checklist

Describe the bug

Running swiftlint rules is throwing a fatal error. I'm using Xcode 11.0 and I believe the issue might be related to this version of Xcode or MacOS Catalina.

Complete output when running SwiftLint, including the stack trace and command used
$ swiftlint rules
Fatal error: Loading sourcekitd.framework/Versions/A/sourcekitd failed: file /Users/marcelofabri/SwiftLint/.build/checkouts/SourceKitten/Source/SourceKittenFramework/library_wrapper.swift, line 66
zsh: illegal hardware instruction  Pods/SwiftLint/swiftlint rules

Environment

  • SwiftLint version? 0.33.0
  • Installation method used? Cocoapods
  • Configuration file:
excluded:
  - Pods

# Rule identifiers to exclude from running
disabled_rules:
  - trailing_whitespace

# Minimum line length
line_length: 240

# Minimum identifier length
identifier_name:
  min_length: 2
@jpsim
Copy link
Collaborator

jpsim commented Jul 1, 2019

Do you also get a similar failure when running swiftlint help? Printing the result of xcodebuild -version would be useful too. Finally, could you please share the results of running these steps?

$ git clone https://github.com/realm/SwiftLint.git
$ cd SwiftLint
$ swift run swiftlint rules

Thanks for your help. I rely on this information to diagnose the issue because I don't have a machine running Catalina available to me and haven't been able to reproduce this issue with Mojave and Xcode 11 beta 2.

@samyanez94
Copy link
Author

When running xcodebuild -version I noticed the following error:

xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

I referred to this thread on Stack Overflow and solved the issue. Afterwards, I was able to run swiftlint rules. I'm therefore closing the issue as it was an environment error.

Thanks for the help! 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants