You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Firstly, thank you so much for building this tool. It is a great pleasure to be able to use my NeoVim environment to code swift!✨
I had a lot of trouble getting the BSP to work with sourcekit lsp, and couldn't find any resources online so documenting my issues and fix in case anyone stumbles on this.
I was unable to get cross-file references to work. The sourcekit lsp was unable to find project references in scope. The issue arised from xcode-build-server not being able to find the build_root after the config step, and a symptom of this is if your "build_root" property in your buildServer.json looks like "build_root": "/Users/arshonsaadati" rather than "build_root": "/Users/arshonsaadati/Library/Developer/Xcode/DerivedData/Simulator_Controller-adadrfjxhdizubdktugddworgvuj". If this is the case, the server.py of the BSP will hang waiting for stdin.
FIX:
The source of the issue is xcode-select if running xcode-select in your command line gives the error xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance. It can be fixed by running sudo xcode-select -s /Applications/Xcode.app/Contents/Developer.
Assuming Xcode is installed in your applications folder, xcode-select, xcodebuild, and xcode-build-server config should function correctly. I've attached a buildServer.json that works for my project as an example, since as a noob I was confused what to put for the scheme argument. buildServer.json
Feel free to close this issue, as no action is required! Thank you!
The text was updated successfully, but these errors were encountered:
Firstly, thank you so much for building this tool. It is a great pleasure to be able to use my NeoVim environment to code swift!✨
I had a lot of trouble getting the BSP to work with sourcekit lsp, and couldn't find any resources online so documenting my issues and fix in case anyone stumbles on this.
I was unable to get cross-file references to work. The sourcekit lsp was unable to find project references in scope. The issue arised from xcode-build-server not being able to find the build_root after the config step, and a symptom of this is if your "build_root" property in your buildServer.json looks like
"build_root": "/Users/arshonsaadati"
rather than"build_root": "/Users/arshonsaadati/Library/Developer/Xcode/DerivedData/Simulator_Controller-adadrfjxhdizubdktugddworgvuj"
. If this is the case, the server.py of the BSP will hang waiting for stdin.FIX:
The source of the issue is xcode-select if running xcode-select in your command line gives the error
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
. It can be fixed by runningsudo xcode-select -s /Applications/Xcode.app/Contents/Developer
.Assuming Xcode is installed in your applications folder, xcode-select, xcodebuild, and xcode-build-server config should function correctly. I've attached a buildServer.json that works for my project as an example, since as a noob I was confused what to put for the scheme argument.
buildServer.json
Feel free to close this issue, as no action is required! Thank you!
The text was updated successfully, but these errors were encountered: