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

completion stops working after error #20

Closed
wibed opened this issue Jul 19, 2021 · 3 comments
Closed

completion stops working after error #20

wibed opened this issue Jul 19, 2021 · 3 comments

Comments

@wibed
Copy link

wibed commented Jul 19, 2021

i have made the experience that after opening a .swift file
and setting the project's root dir i get successful completion

but after one interrupts the completion by keep typing an error occurs,
and no more completion after that.
I suspect it is because sourcekit-lsp crashed

swift version: 5.4.2

lsp error message:

# Table of Contents
2021-07-19 08:11:59.454 sourcekit-lsp[62:ef66e700] triggerFromIncompleteCompletions with incompatible completion session; expected DocumentURI(storage: <file:///work/cards/service/api/Sources/api/User/ControllerUser.swift>)@1215, but got DocumentURI(storage: <file:///work/cards/service/api/Sources/api/User/ControllerUser.swift>)@1224

company error message:

Company: An error occurred in auto-begin
Company: backend (company-capf :with company-yasnippet) error &ldquo;request cancelled&rdquo; with args (candidates fun)

second lsp error message:

2021-07-19 11:00:04.025 sourcekit-lsp[82:8ffff700] error response (Request Failed): codecomplete.open: code completion session for &rsquo;/work/cards/service/api/Sources/api/User/Controller+User.swift&rsquo;, 1166 already exists

backtrace:

stacktrace:

  • 1
  • the second got too long to post

after installing a missing dependency libpython2.7 the error still persists.
namely that the lsp server becomes unresponsive.and completion stops working

additionally i tried:

  • successfully build the project before provoking the error
  • built sourcekit-lsp from source
  • downgraded swift to 5.4
  • used no included framework vanilla swift from swift package init

it seems the trace shows nothing but the empty response from the sourcekit-lsp server.
the error messages differ only from the DocumentURI (which is the same for
expected and for received) and the char number @1151 (which differs between expected and received).

@wibed
Copy link
Author

wibed commented Jul 21, 2021

i started over and created a clean reproduction of the error:

i am typing func for function check the popup and
select the "func" option.

after the selection from the menu starts a snippet out of the full stacktrace

https://termbin.com/kwyw

in the snippet i type in the function name "hello", followed by the parentheses. as first argument i intent to write out "name", but at the second char ("na") the error pops off.

in the end it looks like this:

func hello(na)
            ^ -->> Error pops off after typing "a"

i included a follow up request for code completion, including context, in the stacktrace and the empty response thereafter.

it seems after the return message "request cancelled" with the code "-32800" the process sourcekit-lsp only provides empty responses.

this is accredited with the following error message out of stderr

2021-07-21 02:46:22.001 sourcekit-lsp[47:a15a5700] triggerFromIncompleteCompletions with incompatible completion session; expected DocumentURI(storage: \url{file:///work/cards/service/test/Sources/test/main.swift})@29, but got DocumentURI(storage: \url{file:///work/cards/service/test/Sources/test/main.swift})@35

the full stacktrace is to be found here:
https://termbin.com/0x2n

@wibed wibed changed the title sourcekit-lsp crashes after error completion stops working after error Aug 2, 2021
@wibed
Copy link
Author

wibed commented Aug 2, 2021

my assumption grows the responsibility relies on the client side for this behavior.
here is a backtrace:
https://termbin.com/5dkr

@wibed
Copy link
Author

wibed commented Aug 4, 2021

opened an issue on lsp-mode
emacs-lsp/lsp-mode#3028

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant