SolaWing / xcode-build-server

a build server protocol implementation for integrate xcode with sourcekit-lsp
MIT License
319 stars 18 forks source link

Issues with Autocomplete #57

Closed rodio closed 1 month ago

rodio commented 1 month ago

Hello! Thank you very much for your work on this tool!

I was trying to use it with https://github.com/wojciech-kulik/ios-dev-starter-nvim and it seems that it is almost working for me. However, when I scroll through a couple of sugestions presented by auto completion, they stop working. I see Client 1 quit with exit code 0 and signal 5 in :messages and below is my LSP log and checkhealth xcodebuild

[START][2024-06-16 11:17:25] LSP logging initiated
[ERROR][2024-06-16 11:17:25] .../vim/lsp/rpc.lua:734    "rpc"   "/usr/bin/sourcekit-lsp"    "stderr"    "INFO:server:Xcode Build Server Startup\nINFO:server:use flags from /Users/rodion/Library/Caches/xcode-build-server/-Users-rodion-src-mnemosyne/compile_file-mnemosyne-8566984e1260641bb2dba37bc2456893\n"
[ERROR][2024-06-16 11:17:33] .../vim/lsp/rpc.lua:734    "rpc"   "/usr/bin/sourcekit-lsp"    "stderr"    "/AppleInternal/Library/BuildRoots/860631e9-c1c5-11ee-98ee-b6ef2fd8d87b/Library/Caches/com.apple.xbs/Sources/SourceKitLSP/dependencies/swift-syntax/Sources/SwiftParser/Lexer/Cursor.swift:620: Fatal error\n"
==============================================================================
xcodebuild: require("xcodebuild.health").check()

Checking xcodebuild.nvim ~
- OK xcodebuild.nvim: commit #2c11361

Checking OS ~
- OK macOS 14+: release 23.5.0

Checking plugins ~
- OK telescope.nvim installed.
- OK nui.nvim installed.
- OK nvim-tree installed.
- WARNING neo-tree not installed. (Optional to visually manage project files)
- WARNING oil.nvim not installed. (Optional to visually manage project files)
- OK nvim-dap installed.
- OK nvim-dap-ui installed.
- OK nvim-treesitter installed.
- OK nvim-treesitter: Swift parser installed.

Checking required dependencies ~
- OK xcodebuild: version 15.3
- OK xcodebuild: installed
- OK xcrun: installed
- OK xcode-build-server: installed

Checking optional dependencies ~
- WARNING pymobiledevice3: not installed. Required for debugging on physical devices and/or running apps on devices below iOS 17. (https://github.com/doronz88/pymobiledevice3)
- OK xcodeproj: installed
- OK xcbeautify: installed
- OK ruby: version 3.3.3

Checking debugger ~
- OK nvim-dap: codelldb adapter configured.
- OK nvim-dap: swift configuration found.
- OK codelldb: installed

Checking buildServer.json ~
- OK buildServer.json: found

Checking .nvim/xcodebuild/settings.json ~
- OK .nvim/xcodebuild: found
- OK .nvim/xcodebuild/settings.json: found

Is there an issue with xcode-build-server here? Thank you!

SolaWing commented 1 month ago

seems your sourcekit is crash. it may related to your code. you also can try vscode with swift extension, to exclude the xcodebuild.nvim issue. you may also post a bug to sourcekit-lsp for help

rodio commented 1 month ago

Thank you! Don't know what exactly was happening, but for now I've just rebuild sourcekit-lsp from sources and the problem disappeared.