Skip to content

Relaunching the LSP Server doesn't clean up the output sections #839

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

Closed
nmggithub opened this issue Jun 4, 2024 · 2 comments · Fixed by #841
Closed

Relaunching the LSP Server doesn't clean up the output sections #839

nmggithub opened this issue Jun 4, 2024 · 2 comments · Fixed by #841
Assignees
Labels
bug Something isn't working

Comments

@nmggithub
Copy link

Describe the bug
I am working on a complex Swift package, and I sometimes need to relaunch the LSP in order to see changes I make propagate. Doing so, however, seems to add an entry to the Output section in VSCode every time.

To Reproduce
Steps to reproduce the behavior:

  1. Go to the Output tab in the bottom panel in VSCode
  2. Open the dropdown of output sections
  3. Observe a single entry of "Swift" and a single entry of "SourceKit Language Server"
  4. Press Command-Shift-P and find the "Swift: Restart LSP Server" option and select it
  5. Go back to the dropdown and observe a second entry of "SourceKit Language Server"
  6. Repeat step 4 and observe a new entry each time.

Expected behavior
Restarting the LSP server should not add an entry each time, or, at the very least, these entries should be distinguished from each other.

Environment

  • OS: macOS 14.5
  • Swift version (output of swift --version)
swift-driver version: 1.90.11.1 Apple Swift version 5.10 (swiftlang-5.10.0.13 clang-1500.3.9.4)
Target: arm64-apple-macosx14.0
  • Visual Studio Code version: 1.89.1
  • vscode-swift version: v1.9.0
@nmggithub nmggithub added the bug Something isn't working label Jun 4, 2024
@adam-fowler
Copy link
Contributor

I think this is probably a bug with VSCode, I don't control the display of this view. I'll have a look to see if there is anyway I can clear this.
Hopefully with Swift 6 you won't need to restart the server so much. There have been many improvements to SourceKit-LSP which will become available then.

@plemarquand
Copy link
Contributor

@adam-fowler I had some luck here disposing the old client's output channel on a restart in #841. This removes the entry from the output list.

@plemarquand plemarquand self-assigned this Jun 5, 2024
@award999 award999 moved this to In Progress in Visual Code Swift Extension Jun 6, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in Visual Code Swift Extension Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants