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

LSP client requests are not responding #7091

Closed
1 task done
bishabosha opened this issue Jan 30, 2024 · 1 comment
Closed
1 task done

LSP client requests are not responding #7091

bishabosha opened this issue Jan 30, 2024 · 1 comment
Labels
defect [core label] language server failure Language server doesn't work as expected language server An umbrella label for all language servers

Comments

@bishabosha
Copy link

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

No request is observed for workspace/configuration (which is registered as a handler before the initialize handshake), its weird because notifications from the client are handled - I assumed there would be very similar logic for processing these.

  • build Zed from https://github.com/bishabosha/zed/tree/feature-add-scala

    • cargo run
  • check out https://github.com/bishabosha/enum-extensions

    • in enum-extensions dir, run scala-cli setupIde . (you need to install scala)
    • mkdir .metals (used to store LSP logs)
    • touch .metals/lsp.trace.json (the JSON-RPC log of send/recieved messages)
    • tail -f .metals/lsp.trace.json
  • open enum-extensions in my Zed build.

    • Metals should be installed as an LSP server (make sure you have coursier installed by following the Scala installation)
    • observe LSP initialisation handshake is done in .metals/lsp.trace.json file,
    • observe that then the request is sent for workspace/configuration in the .metals/lsp.trace.json file.
    • I have added debug printing to Zed for request handlers but nothing is printed for workspace/configuration.

Environment

OS: macOS 14.2.1
Memory: 16 GiB
Architecture: x86_64

If applicable, add mockups / screenshots to help explain present your vision of the feature

No response

If applicable, attach your ~/Library/Logs/Zed/Zed.log file to this issue.

If you only need the most recent lines, you can run the zed: open log command palette action to see the last 1000.

couldn't get that to work, but here are my own console logs from running Zed:

[2024-01-30T16:10:19Z ERROR lsp] metals LSP before initialize request!
[2024-01-30T16:10:20Z ERROR lsp] Metals LSP initialized (PRE)!
[2024-01-30T16:10:20Z ERROR lsp] Metals LSP initialized (SENT)!
[2024-01-30T16:10:32Z ERROR lsp] LSP notification window/logMessage received
[2024-01-30T16:10:32Z ERROR lsp] LSP notification window/logMessage received with params LogMessageParams { typ: Log, message: "2024.01.30 17:10:32 DEBUG Resolved mtags for 3.3.1" }
[2024-01-30T16:10:32Z ERROR lsp] LSP notification window/logMessage received
[2024-01-30T16:10:32Z ERROR lsp] LSP notification window/logMessage received with params LogMessageParams { typ: Log, message: "2024.01.30 17:10:32 INFO  no build target found for /Users/jamie/workspace/enum-extensions/project.scala. Using presentation compiler with project's scala-library version: 3.3.1" }
[2024-01-30T16:10:57Z ERROR util] crates/lsp/src/lsp.rs:621: oneshot canceled
@bishabosha bishabosha added admin read Pending admin review defect [core label] triage Maintainer needs to classify the issue labels Jan 30, 2024
@JosephTLyons JosephTLyons added language server failure Language server doesn't work as expected language server An umbrella label for all language servers and removed triage Maintainer needs to classify the issue admin read Pending admin review labels Feb 2, 2024
@bishabosha
Copy link
Author

bishabosha commented Apr 23, 2024

This was fixed by #7662, I did not identify this when reporting because Metals uses integers converted to strings for its request ID. So when reading the logs, I would have not made the link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect [core label] language server failure Language server doesn't work as expected language server An umbrella label for all language servers
Projects
None yet
Development

No branches or pull requests

3 participants