[GSoC-19] IndexStoreDB Error

gsoc-2019
(Sharath Sriram) #1

I am Sharath, student from India, interested in working on Code Formatting Functionality for SourceKit-LSP for GSoC-19.
I built SourceKit-LSP on my Mac and got it running.
I opened a random Swift project on VSCode and was able to see definitions, so it's working.
However, when I check the Output Console, it says the following:

failed to open IndexStoreDB: indexstoredb_index_create error: index store path does not exist: /Users/sharathsriram/Documents/Development/TestRepo/Money/.build/x86_64-apple-macosx/debug/index/store

Is there anything I did wrong during the setup ?

(Marcin Krzyzanowski) #2

You need to 'swift build' the project in order to build the index that can be later used by the sourcekit-lsp server. Did you build the project?

(Sharath Sriram) #3

Yes, I ran “swift build” on the project folder before opening.

(Amit Kumar) #4

I'm also trying to build swift on my mac, but I'm getting problem . I also raised an issue but got no response, It will be great help if you help.

(Ben Langmuir) #5

What toolchain did you build sourcekit-lsp with? The -index-store-path option was only enabled automatically by swiftpm in the last few months, so it might not be enabled in your toolchain. If that's the case, you may be able to workaround by adding

-Xswiftc -index-store-path -Xswiftc .build/x86_64-apple-macosx/debug/index/store