Closed joeldrotleff closed 8 months ago
[ERROR][2024-03-15 15:28:38] .../vim/lsp/rpc.lua:734 "rpc" "/usr/local/bin/sourcekit-lsp" "stderr" "WARNING:root:observe thread exit by exception: invalid literal for int() with base 10: b'92*{'\n"
I saw this error In your log, this seems to simliar to https://github.com/SolaWing/xcode-build-server/issues/40#issuecomment-1959434102. It should fixed at the commit 9425d7b, and included in release 1.0.1. if your version newer than this commit, you should upload your xcactivitylog to me for debugging it.
Ok I installed latest with 'brew install Xcode-build-server --head', then cleaned and rebuilt and still seeing the error.
Here's my log 250B0F47-2287-4484-A3DB-4D275B8477C7.xcactivitylog.zip
can you run xcode-build-server debug print-xclog <path_to_your_xclog>
correctly?
also what your buildServer.json likes? is it use your newest brew version?
else you may export SOURCEKIT_LOGGING=3 and see details log to confirm which reason
Ok so I uninstalled and reinstalled from HEAD to make sure I'm on the latest version:
joel@Joels-MacBook-Air ~/c/c/i/C/.n/xcodebuild (main)> brew uninstall --force xcode-build-server
Uninstalling xcode-build-server... (13 files, 65KB)
joel@Joels-MacBook-Air ~/c/c/i/C/.n/xcodebuild (main)> brew install xcode-build-server --head
==> Fetching xcode-build-server
==> Downloading https://raw.githubusercontent.com/Homebrew/homebrew-core/df7d3165c366af478e8c925379b436dc4e4c4f14/Formula/x/xcode-build-server.rb
Already downloaded: /Users/joel/Library/Caches/Homebrew/downloads/9f9ff81d9665c5a45c08269e684a2f383b4a1b3f15d6e587b0ee158f4b59de46--xcode-build-server.rb
==> Cloning https://github.com/SolaWing/xcode-build-server.git
Updating /Users/joel/Library/Caches/Homebrew/xcode-build-server--git
==> Checking out branch master
Already on 'master'
Your branch is up to date with 'origin/master'.
HEAD is now at 04ade42 fix: xcode 15.3 clang unfold @
🍺 /opt/homebrew/Cellar/xcode-build-server/HEAD-04ade42: 13 files, 65.0KB, built in 1 second
==> Running brew cleanup xcode-build-server
...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see man brew
).
I then ran the command you suggested: joel@Joels-MacBook-Air ~/c/c/i/Classmate (main)> xcode-build-server debug print-xclog ~/Library/Developer/Xcode/DerivedData/Classmate-airajjsuipitpxamfrvcnvhvhqpv
But all it prints is: joel@Joels-MacBook-Air ~/c/c/i/Classmate (main)> xcode-build-server debug print-xclog ~/Library/Developer/Xcode/DerivedData/Classmate-airajjsuipitpxamfrvcnvhvhqpv INFO:root:# xcode builde server with python 3.12.2 (main, Feb 6 2024, 20:19:44) [Clang 15.0.0 (clang-1500.1.0.2.5)]]
Here is my buildServer.json:
{ "name": "xcode build server", "version": "0.2", "bspVersion": "2.0", "languages": [ "c", "cpp", "objective-c", "objective-cpp", "swift" ], "argv": [ "/usr/local/bin/xcode-build-server" ], "workspace": "/Users/joel/code/classmate/ios/Classmate/Classmate.xcodeproj/project.xcworkspace", "build_root": "/Users/joel/Library/Developer/Xcode/DerivedData/Classmate-airajjsuipitpxamfrvcnvhvhqpv", "scheme": "Classmate Dev", "kind": "xcode" }
Aslo I tried running this command: extract_compile_log at /Users/joel/Library/Developer/Xcode/DerivedData/Classmate-airajjsuipitpxamfrvcnvhvhqpv/Logs/Build/82842E9F-41EF-4358-B1A0-1282854C0A64.xcactivitylog
And that gives me:
Traceback (most recent call last):
File "/usr/local/bin/xcode-build-server", line 58, in
did brew install your xcode-build-server to /usr/local/bin? if not, you should remove it first and rerun your config command to update to use brew path
did brew install your xcode-build-server to /usr/local/bin? if not, you should remove it first and rerun your config command to update to use brew path
@SolaWing I think it should be changed to overwrite this path. If you switch between source code and brew it's causing an issue hard to spot. I fell into this trap as well :D
Ahhh ok mystery solved, I had an old version still installed that was overriding the homebred-installed one. Homebrew installs to /opt-homebrew-bin and symlinks it into /usr/local/bin.
Anyways after running sudo rm -rf /usr/local/bin/xcode-build-server
and then xcode-build-server config -project *.xcodeproj -scheme "Classmate Dev"
, LSP is working now.
Thanks for your help on this @SolaWing and @wojciech-kulik 🙏
did brew install your xcode-build-server to /usr/local/bin? if not, you should remove it first and rerun your config command to update to use brew path
@SolaWing I think it should be changed to overwrite this path. If you switch between source code and brew it's causing an issue hard to spot. I fell into this trap as well :D
/usr/local/bin path is prior to brew version and not use.. I won't know which version user really use and can only tip them to check version and ensure uninstall old manual clone version..
I meant when user calls xcode-build-server config
the path should be updated. What do you think?
@wojciech-kulik It indeed updated.. But he use the /usr/local/bin/xcode-build-server is old, not brew version, so config won't change. if he use the brew version and run config, the path will updated to brew version. config will record the same path as the used binary.
Oh, got it 👍
Hello,
After upgrading to Xcode 15.3 I am encountering this error. Here is the full text of my lsp.log (I cleared it, restarted Neovim, and this is what I got:
[START][2024-03-15 15:28:37] LSP logging initiated [WARN][2024-03-15 15:28:37] ...lsp/handlers.lua:137 "The language server copilot triggers a registerCapability handler despite dynamicRegistration set to false. Report upstream, this warning is harmless" [ERROR][2024-03-15 15:28:38] .../vim/lsp/rpc.lua:734 "rpc" "/usr/local/bin/sourcekit-lsp" "stderr" "INFO:root:Xcode Build Server Startup. Waiting Request...\n" [ERROR][2024-03-15 15:28:38] .../vim/lsp/rpc.lua:734 "rpc" "/usr/local/bin/sourcekit-lsp" "stderr" "WARNING:root:observe thread exit by exception: invalid literal for int() with base 10: b'92*{'\n" [ERROR][2024-03-15 15:28:41] .../vim/lsp/rpc.lua:734 "rpc" "/usr/local/bin/sourcekit-lsp" "stderr" "[2024-03-15 15:28:41.184] error response (Request Failed): Loading the standard library failed\n" [ERROR][2024-03-15 15:28:41] .../vim/lsp/rpc.lua:734 "rpc" "/usr/local/bin/sourcekit-lsp" "stderr" '[2024-03-15 15:28:41.187] cursor info failed DocumentURI(storage: file:///Users/joel/code/classmate/ios/Classmate/Classmate/Views/Messaging/MessagesList.swift):7:44: ResponseError(code: LanguageServerProtocol.ErrorCode(rawValue: -32001), message: "sourcekitd request failed: error response (Request Failed): Loading the standard library failed")\n'
Notes:
Hmmmm....tried creating a simple project, one page iOS app from scratch and...LSP works (in that project)...still broken in my app though.
Do you know how I can track this down?