Questions tagged [sourcekit]

27 questions
121
votes
27 answers

SourceKitService Consumes CPU and Grinds Xcode to a Halt

This is NOT a Beta issue. I am on Xcode 6.0.1, production release. The issue I am having is that when I try to do a Build or Run the code I am working on, Xcode becomes unresponsive for large periods of time and the SourceKitService consumes…
zeeple
  • 5,509
  • 12
  • 43
  • 71
31
votes
9 answers

Xcode Couldn't Generate Swift Representation for my own framework

I have created a framework which I want to use in my OS X app. Since updating to Xcode 7 on El Capitan, when I try to command-click on the import statement, Xcode goes to the following view. How can I get Xcode to display the Swift representation…
David Skrundz
  • 13,067
  • 6
  • 42
  • 66
17
votes
2 answers

Xcode Source Kit will not stop crashing with Swift

I need to find a solution to the super awesome "Source Kit Crashing" error with Swift. I have read many stack overflow posts but it doesn't seem like anyone has a solution. If there is a single line of code causing the problem there is no way I will…
DBoyer
  • 3,062
  • 4
  • 22
  • 32
16
votes
2 answers

Xcode 6.1 GM Seed's autocomplete always terminate

Today, I have downloaded Xcode 6.1 GM Seed from apple developer site so when I try to write in Swift it always crash. Xcode's popup a notify: SourceKit crash blah blah... Editor functionally temporary limited sometime like this. How can I solve this…
HaiN
  • 917
  • 11
  • 31
10
votes
2 answers

How do I restore indexing functionality? (Xcode)

One of my projects (containing over 200 files in pure Swift) has just recently started interfering with the indexing process. The indexing process freezes midway and then stops abruptly, causing SourceKitService to crash. I simply cannot find the…
Vatsal Manot
  • 17,695
  • 9
  • 44
  • 80
9
votes
2 answers

XcodeKit and SourceKit

I don't have experience in XcodeKit and SourceKit apart from a few articles that I read and the official pages https://developer.apple.com/documentation/xcodekit#topics https://github.com/apple/swift/tree/master/tools/SourceKit I'm trying to…
ggould75
  • 880
  • 2
  • 14
  • 23
6
votes
0 answers

Proper way to debug your own framework project from main app project in Xcode 8?

I have read about two possibilities for that: To build the framework as debug, to add it to main app project, and run the main project also as debug. Breakpoints should allow you to inspect the frameworks code stepping into it. To add somehow the…
AppsDev
  • 12,319
  • 23
  • 93
  • 186
6
votes
1 answer

SourceKitService sucking memory and grinding all processes to a halt

I am having a lot of trouble with stupid SourceKitService. It is taking up like 20GB of memory sometimes and just means my lapTop is pretty much useless it is so slow. I am using xCode 6.4 and working in Swift. I am working on a large project so I…
villy393
  • 2,985
  • 20
  • 28
5
votes
0 answers

How to use SourceKit python bindings?

Sorry for such broad question, but after some attempts I'm not sure how to use python bindings. I tried to just import "request.py" or "capi.py" but all I got were errors. After adding missing libraries to my search path, I ended with missing symbol…
Maciej Kozieł
  • 959
  • 11
  • 24
3
votes
2 answers

Xcode loses syntax highlighting when file is open in multiple tabs

I have had an issue with syntax highlighting/coloring since Xcode 9.3.0. I work in multiple tabs a lot. Sometimes I have the same file open in multiple tabs to either have reference to different parts of the file or if I'm using one with the…
Jared
  • 793
  • 6
  • 16
3
votes
1 answer

Xcode 8 with legacy Swift 2.3: SourceKit imposes Swift 3.0 rules & shows phantom errors

It seems Xcode is passive-aggressively encouraging me to switch to Swift 3.0. As I type code, and when I invoke a build, all kinds of warnings & errors relating to Swift 3.0 syntax show up, only to disappear once compilation finishes. It seems the…
BaseZen
  • 8,650
  • 3
  • 35
  • 47
2
votes
1 answer

Capturing local variables in Swift log lines with minimal effort & maintenance

I’m trying to add local variable values/names to my Swift log lines. Out-of-the-box Swift provides a great way to adorn log lines with #file, #function etc without explicit effort. I want to go further and scoop up all the local variables in scope…
Jaysen Marais
  • 3,956
  • 28
  • 44
2
votes
1 answer

Error in backend: invalid llvm.linker.options building SourceKit-LSP on Ubuntu 18.10

I am following this tutorial in order to get Visual Studio Code and SourceKit-LSP integrated on Ubuntu 18.10, however, I got stuck at building sourcekit-lsp project. The error I'm getting: fatal error : error in backend: invalid…
Łukasz Sypniewski
  • 602
  • 1
  • 10
  • 19
2
votes
0 answers

How do I get AST information about array subscript uses in SwiftLint (or SourceKitten)

I'm trying to write a new rule around array subscripting uses in SwiftLint, but I can't seem to get the information I need. So for the following example Swift code: let arr = [1, 2, 3] let dict = [1: "hi", 2: "bye"] arr[2] dict[2] I want a rule…
Nick Shelley
  • 271
  • 3
  • 8
2
votes
2 answers

Xcode 6 sprite kit - SourceKitService terminated

I got SourceKitService terminated when I implement this method: override func touchesBegan(touches: NSSet!, withEvent event: UIEvent!) if I remove the ! , it works. But then I got an error in my code of course. Full code: override func…
user3722523
  • 1,740
  • 2
  • 15
  • 27
1
2