unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Brennan Vincent <brennan@umanwizard.com>
To: 68699@debbugs.gnu.org, joaotavora@gmail.com
Subject: bug#68699: Eglot completion has stopped working in some cases
Date: Wed, 24 Jan 2024 15:37:19 -0500	[thread overview]
Message-ID: <87mssutqm8.fsf@prescott.mail-host-address-is-not-set> (raw)

I bisected the issue to e93d99a4a0ce578249304dce350465c580a49892, so
including João.

In some cases when attempting to complete using eglot, I am getting
errors rather than a list of completions. I haven't been able to debug
why but it seems to be happening in "pcm" completion style.

For example, in a Rust crate with the following main file:

fn foo_len() {
}

fn main() {
    len
}

positioning my cursor after "len" and attempting completion yields the
following error message:

completion-pcm--merge-completions: Internal error: _mm_blend_epi16(…)
(use std::arch::x86_64::_mm_blend_epi16) doesn’t match \`len

Full backtrace:

Debugger entered--Lisp error: (error #("Internal error: _mm_blend_epi16(…) (use std::arch::x86_64::_mm_blend_epi16) doesn’t match \\`len" 16 17 (eglot--lsp-item (:label #("_mm_blend_epi16(…) (use std::arch::x86_64::_mm_blend_epi16)" 0 1 (eglot--lsp-item #5) 5 8 (face completions-common-part)) :kind 3 :detail "unsafe fn(__m128i, __m128i) -> __m128i" :documentation (:kind "markdown" :value "Blend packed 16-bit integers from `a` and `b` using the mask `IMM8`.\n\nThe mask bits determine the selection. A clear bit selects the\ncorresponding element of `a`, and a set bit the corresponding\nelement of `b`.\n\n[Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm_blend_epi16)") :deprecated :json-false :sortText "fffffff0" :filterText #("_mm_blend_epi16" 5 8 (face completions-common-part)) :insertTextFormat 2 :textEdit (:range (:start (:line 4 :character 4) :end (:line 4 :character 7)) :newText "_mm_blend_epi16(${1:a}, ${2:b})$0") :additionalTextEdits [] :command (:title "triggerParameterHints" :command "rust-analyzer.triggerParameterHints") :data (:position (:textDocument (:uri "file:///home/brennan/test_rust/src/bin/test_rust.rs") :position (:line 4 :character 7)) :imports [(:full_import_path "std::arch::x86_64::_mm_blend_epi16" :imported_name "_mm_blend_epi16")]))) 21 24 (face completions-common-part)))
  signal(error (#("Internal error: _mm_blend_epi16(…) (use std::arch::x86_64::_mm_blend_epi16) doesn’t match \\`len" 16 17 (eglot--lsp-item (:label #("_mm_blend_epi16(…) (use std::arch::x86_64::_mm_blend_epi16)" 0 1 (eglot--lsp-item #6) 5 8 (face completions-common-part)) :kind 3 :detail "unsafe fn(__m128i, __m128i) -> __m128i" :documentation (:kind "markdown" :value "Blend packed 16-bit integers from `a` and `b` using the mask `IMM8`.\n\nThe mask bits determine the selection. A clear bit selects the\ncorresponding element of `a`, and a set bit the corresponding\nelement of `b`.\n\n[Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm_blend_epi16)") :deprecated :json-false :sortText "fffffff0" :filterText #("_mm_blend_epi16" 5 8 (face completions-common-part)) :insertTextFormat 2 :textEdit (:range (:start (:line 4 :character 4) :end (:line 4 :character 7)) :newText "_mm_blend_epi16(${1:a}, ${2:b})$0") :additionalTextEdits [] :command (:title "triggerParameterHints" :command "rust-analyzer.triggerParameterHints") :data (:position (:textDocument (:uri "file:///home/brennan/test_rust/src/bin/test_rust.rs") :position (:line 4 :character 7)) :imports [(:full_import_path "std::arch::x86_64::_mm_blend_epi16" :imported_name "_mm_blend_epi16")]))) 21 24 (face completions-common-part))))
  error("Internal error: %s doesn't match %s" #("_mm_blend_epi16(…) (use std::arch::x86_64::_mm_blend_epi16)" 0 1 (eglot--lsp-item (:label #2 :kind 3 :detail "unsafe fn(__m128i, __m128i) -> __m128i" :documentation (:kind "markdown" :value "Blend packed 16-bit integers from `a` and `b` using the mask `IMM8`.\n\nThe mask bits determine the selection. A clear bit selects the\ncorresponding element of `a`, and a set bit the corresponding\nelement of `b`.\n\n[Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm_blend_epi16)") :deprecated :json-false :sortText "fffffff0" :filterText #("_mm_blend_epi16" 5 8 (face completions-common-part)) :insertTextFormat 2 :textEdit (:range (:start (:line 4 :character 4) :end (:line 4 :character 7)) :newText "_mm_blend_epi16(${1:a}, ${2:b})$0") :additionalTextEdits [] :command (:title "triggerParameterHints" :command "rust-analyzer.triggerParameterHints") :data (:position (:textDocument (:uri "file:///home/brennan/test_rust/src/bin/test_rust.rs") :position (:line 4 :character 7)) :imports [(:full_import_path "std::arch::x86_64::_mm_blend_epi16" :imported_name "_mm_blend_epi16")]))) 5 8 (face completions-common-part)) "\\`len")
  completion-pcm--merge-completions((... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) ("len"))
  completion-pcm--merge-try(("len") (... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) "" "")
  completion-pcm-try-completion("len" #f(compiled-function (pattern pred action) #<bytecode 0x19ec37e26e8f5965>) nil 3)
  #f(compiled-function (style) #<bytecode -0x32c2df51d2b464c>)(partial-completion)
  #f(compiled-function (elt) #<bytecode 0x19004498146b82cc>)(partial-completion)
  mapc(#f(compiled-function (elt) #<bytecode 0x19004498146b82cc>) (eglot--dumb-flex basic partial-completion emacs22))
  seq-do(#f(compiled-function (elt) #<bytecode 0x19004498146b82cc>) (eglot--dumb-flex basic partial-completion emacs22))
  seq-some(#f(compiled-function (style) #<bytecode -0x32c2df51d2b464c>) (eglot--dumb-flex basic partial-completion emacs22))
  completion--nth-completion(1 "len" #f(compiled-function (pattern pred action) #<bytecode 0x19ec37e26e8f5965>) nil 3 (metadata (category . eglot-capf) (display-sort-function . #f(compiled-function (completions) #<bytecode -0x67c261ef9006e89>))))
  completion-try-completion("len" #f(compiled-function (pattern pred action) #<bytecode 0x19ec37e26e8f5965>) nil 3 (metadata (category . eglot-capf) (display-sort-function . #f(compiled-function (completions) #<bytecode -0x67c261ef9006e89>))))
  ivy-completion-in-region(#<marker at 35 in test_rust.rs> 38 #f(compiled-function (pattern pred action) #<bytecode 0x19ec37e26e8f5965>) nil)
  completion-in-region(#<marker at 35 in test_rust.rs> 38 #f(compiled-function (pattern pred action) #<bytecode 0x19ec37e26e8f5965>) nil)
  completion-at-point()
  complete-symbol(nil)
  funcall-interactively(complete-symbol nil)
  call-interactively(complete-symbol nil nil)
  command-execute(complete-symbol)






             reply	other threads:[~2024-01-24 20:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-24 20:37 Brennan Vincent [this message]
2024-01-24 20:41 ` bug#68699: Eglot completion has stopped working in some cases João Távora
2024-01-25  0:43 ` João Távora
2024-01-25  1:35   ` João Távora
2024-01-25 15:34     ` Brennan Vincent
2024-01-25 19:11       ` João Távora

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mssutqm8.fsf@prescott.mail-host-address-is-not-set \
    --to=brennan@umanwizard.com \
    --cc=68699@debbugs.gnu.org \
    --cc=joaotavora@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).