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

"could not open compilation database for /path/to/Foo.swift" #3

Open
dabrahams opened this issue Dec 14, 2018 · 2 comments
Open

"could not open compilation database for /path/to/Foo.swift" #3

dabrahams opened this issue Dec 14, 2018 · 2 comments

Comments

@dabrahams
Copy link
Contributor

I can only get lsp-sourcekit to give me the following in *Messages* buffer:

could not find manifest, or not a SwiftPM package: /path/to/current/directory
could not open compilation database for /path/to/current/directory/Foo.swift [3 times]

Do I need to have a SwiftPM package for my project in order to do anything?

@danielmartin
Copy link
Collaborator

Yes, for now sourcekit-lsp requires a Swift PM package that provides the necessary compile flags. The second warning can be ignored for Swift projects. It only applies to projects that provide compilation flags using a compilation database (https://clang.llvm.org/docs/JSONCompilationDatabase.html).

@charshep
Copy link

charshep commented Mar 27, 2020

I'm trying to get this working with Xcode 11.4 and I'm seeing the same errors. Is it still the case that lsp-sourcekit only works for projects that have a Swift PM package? If so, perhaps the quickstart guide should indicate that.

I do seem to have things working in a sample project (SourceKittenDaemon actually) that has a PM package. Hoping to get this working for an existing iOS project for which this is not the case. Looks promising so far, thank you!

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

3 participants