Skip to content

Ignore workspace/didChangeConfiguration #114

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
3 tasks done
joewreschnig opened this issue Jun 18, 2022 · 1 comment
Closed
3 tasks done

Ignore workspace/didChangeConfiguration #114

joewreschnig opened this issue Jun 18, 2022 · 1 comment
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself type: enhancement Proposed improvement

Comments

@joewreschnig
Copy link
Contributor

joewreschnig commented Jun 18, 2022

Describe the request

The eglot LSP client for Emacs sends the workspace/didChangeConfiguration notification by default on startup (and if configuration changes later).

arduino-language-server currently panics and dies if it receives this notification. However, since it's just a notification and doesn't demand the language server actually do anything, it seems like while unsupported it would be more useful as a no-op rather than a panic.

Describe the current behavior

The server panics when eglot connects and sends workspace/didChangeConfiguration.

[stderr] 2022/06/18 17:28:20 IDE --> LS NOTIF workspace/didChangeConfiguration
[stderr] 2022/06/18 17:28:20 Panic: unimplemented
[stderr] 
[stderr] goroutine 8 [running]:
[stderr] runtime/debug.Stack()
[stderr] 	/home/piman/sdk/go1.18/src/runtime/debug/stack.go:24 +0x65
[stderr] github.com/arduino/arduino-language-server/streams.CatchAndLogPanic()
[stderr] 	/home/piman/go/pkg/mod/github.com/arduino/[email protected]/streams/panics.go:14 +0x74
[stderr] panic({0x9f4fa0, 0xbeba90})
[stderr] 	/home/piman/sdk/go1.18/src/runtime/panic.go:838 +0x207
[stderr] github.com/arduino/arduino-language-server/ls.(*IDELSPServer).WorkspaceDidChangeConfiguration(0xc0002cc1c8?, {0x11?, 0x18?}, 0x9d4880?)
[stderr] 	/home/piman/go/pkg/mod/github.com/arduino/[email protected]/ls/lsp_server_ide.go:232 +0x27
etc

Arduino Language Server version

0.6.0

Arduino CLI version

0.23.0

Operating system

Linux

Operating system version

Debian 11.3

Additional context

For anyone finding this and trying to work around the issue, setting eglot-connect-hook to nil will disable the call on startup, but it may still be fired later. eglot-connect-hook is also flagged as a risky local variable which may require changing your enable-local-variables setting to load properly.

Issue checklist

  • I searched for previous requests in the issue tracker
  • I verified the feature was still missing when using the latest version
  • My request contains all necessary details
@joewreschnig joewreschnig added the type: enhancement Proposed improvement label Jun 18, 2022
@per1234 per1234 added the topic: code Related to content of the project itself label Jun 18, 2022
joewreschnig added a commit to joewreschnig/arduino-language-server that referenced this issue Jun 23, 2022
@cmaglie
Copy link
Member

cmaglie commented Jul 5, 2022

Fixed by #121

@cmaglie cmaglie closed this as completed Jul 5, 2022
@per1234 per1234 added the conclusion: resolved Issue was resolved label Jul 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
Development

No branches or pull requests

3 participants