Skip to content

lsp-sourcekit ;; completion stops working after lsp server returns an error #3028

@wibed

Description

@wibed

Thank you for the bug report

  • I am using the latest version of lsp-mode related packages.
  • I checked FAQ and Troubleshooting sections
  • You may also try reproduce the issue using clean environment using the following command
emacs -q -l lsp-start-plain.el

where lsp-start-plain.el can be downloaded here.

Bug description

completion stopped working after receiving a completion error from the sourcekit-lsp

the completion stops working if one follows the reproduction right here:

func hello(na
------------^

and the following logs are produced. the communication with the sourcekit-lsp
continues, as the stacktrace shows, but completion stops working.

Steps to reproduce

  1. open swift file
  2. set the root path for the project
  3. type "fun", select the proper ("func") selection from the dropdown
  4. try typing out " hello(name: String)" after that

Expected behavior

the completion to work after receiving a completion error from the sourcekit-lsp

current behavior

completion stopped working after receiving a completion error from the sourcekit-lsp

Which Language Server did you use?

context

os: linux 5.12.19_1
emacs: 28.0.50 (x86_64)
language: swift (swift-mode)
lsp: lsp-mode, lsp-sourcekit

OS

Linux

Error callstack

- [company-diag](https://termbin.com/2oj0)
- [backtrace](https://termbin.com/so0c)
- [lsp-log](https://termbin.com/rzgk)
- [sourcekit-ls](https://termbin.com/s5ss)
- [stacktrace](https://termbin.com/1rqs)

Anything else?

  • trying to clean the company cache manually had no effect
  • adding (setq yas-inhibit-overlay-modification-protection t) had no effect

UPDATE:

  • manually cleaning the cache with (lsp-completion--clear-cache t) had some effect, manual completion at point works. but even restarting swift-mode does not bring back expected functionality.
  • disabling cache at startup setting (setq lsp-completion-no-cache t) had no effect.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions