From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Brennan Vincent Newsgroups: gmane.emacs.bugs Subject: bug#68699: Eglot completion has stopped working in some cases Date: Wed, 24 Jan 2024 15:37:19 -0500 Message-ID: <87mssutqm8.fsf@prescott.mail-host-address-is-not-set> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6814"; mail-complaints-to="usenet@ciao.gmane.io" To: 68699@debbugs.gnu.org, joaotavora@gmail.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jan 24 21:38:07 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rSk0d-0001Yd-AV for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 24 Jan 2024 21:38:07 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rSk0V-0004ap-Qt; Wed, 24 Jan 2024 15:38:00 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rSk0S-0004aO-Rg for bug-gnu-emacs@gnu.org; Wed, 24 Jan 2024 15:37:56 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rSk0S-0007G8-IX for bug-gnu-emacs@gnu.org; Wed, 24 Jan 2024 15:37:56 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rSk0X-00038g-VK for bug-gnu-emacs@gnu.org; Wed, 24 Jan 2024 15:38:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Brennan Vincent Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 24 Jan 2024 20:38:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 68699 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org, =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-Received: via spool by submit@debbugs.gnu.org id=B.170612866712042 (code B ref -1); Wed, 24 Jan 2024 20:38:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 24 Jan 2024 20:37:47 +0000 Original-Received: from localhost ([127.0.0.1]:46700 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rSk0I-000389-TI for submit@debbugs.gnu.org; Wed, 24 Jan 2024 15:37:47 -0500 Original-Received: from lists.gnu.org ([2001:470:142::17]:48548) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rSk0F-00037v-W9 for submit@debbugs.gnu.org; Wed, 24 Jan 2024 15:37:44 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rSk03-0004Xx-Gl for bug-gnu-emacs@gnu.org; Wed, 24 Jan 2024 15:37:33 -0500 Original-Received: from smtp.umanwizard.com ([54.203.248.109]) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rSk01-0007DO-DE for bug-gnu-emacs@gnu.org; Wed, 24 Jan 2024 15:37:31 -0500 Original-Received: from localhost ([173.205.212.102]) by smtp.umanwizard.com ; 24 Jan 2024 20:37:23 +0000 X-Fes-Received-For: bug-gnu-emacs@gnu.org X-Fes-Received-From: X-Fes-Encrypted: true X-Fes-Ehlo-Domain: localhost Received-SPF: pass client-ip=54.203.248.109; envelope-from=brennan@umanwizard.com; helo=smtp.umanwizard.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:278820 Archived-At: I bisected the issue to e93d99a4a0ce578249304dce350465c580a49892, so including Jo=C3=A3o. 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(=E2=80= =A6) (use std::arch::x86_64::_mm_blend_epi16) doesn=E2=80=99t match \`len Full backtrace: Debugger entered--Lisp error: (error #("Internal error: _mm_blend_epi16(=E2= =80=A6) (use std::arch::x86_64::_mm_blend_epi16) doesn=E2=80=99t match \\`l= en" 16 17 (eglot--lsp-item (:label #("_mm_blend_epi16(=E2=80=A6) (use std::= arch::x86_64::_mm_blend_epi16)" 0 1 (eglot--lsp-item #5) 5 8 (face completi= ons-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=3D_mm_blend_ep= i16)") :deprecated :json-false :sortText "fffffff0" :filterText #("_mm_blen= d_epi16" 5 8 (face completions-common-part)) :insertTextFormat 2 :textEdit = (:range (:start (:line 4 :character 4) :end (:line 4 :character 7)) :newTex= t "_mm_blend_epi16(${1:a}, ${2:b})$0") :additionalTextEdits [] :command (:t= itle "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_impo= rt_path "std::arch::x86_64::_mm_blend_epi16" :imported_name "_mm_blend_epi1= 6")]))) 21 24 (face completions-common-part))) signal(error (#("Internal error: _mm_blend_epi16(=E2=80=A6) (use std::arc= h::x86_64::_mm_blend_epi16) doesn=E2=80=99t match \\`len" 16 17 (eglot--lsp= -item (:label #("_mm_blend_epi16(=E2=80=A6) (use std::arch::x86_64::_mm_ble= nd_epi16)" 0 1 (eglot--lsp-item #6) 5 8 (face completions-common-part)) :ki= nd 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\nelemen= t of `b`.\n\n[Intel's documentation](https://www.intel.com/content/www/us/e= n/docs/intrinsics-guide/index.html#text=3D_mm_blend_epi16)") :deprecated :j= son-false :sortText "fffffff0" :filterText #("_mm_blend_epi16" 5 8 (face co= mpletions-common-part)) :insertTextFormat 2 :textEdit (:range (:start (:lin= e 4 :character 4) :end (:line 4 :character 7)) :newText "_mm_blend_epi16(${= 1:a}, ${2:b})$0") :additionalTextEdits [] :command (:title "triggerParamete= rHints" :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::x= 86_64::_mm_blend_epi16" :imported_name "_mm_blend_epi16")]))) 21 24 (face c= ompletions-common-part)))) error("Internal error: %s doesn't match %s" #("_mm_blend_epi16(=E2=80=A6)= (use std::arch::x86_64::_mm_blend_epi16)" 0 1 (eglot--lsp-item (:label #2 = :kind 3 :detail "unsafe fn(__m128i, __m128i) -> __m128i" :documentation (:k= ind "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 sele= cts the\ncorresponding element of `a`, and a set bit the corresponding\nele= ment of `b`.\n\n[Intel's documentation](https://www.intel.com/content/www/u= s/en/docs/intrinsics-guide/index.html#text=3D_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 "triggerParam= eterHints" :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 ac= tion) #) nil 3) #f(compiled-function (style) #)(partial-comp= letion) #f(compiled-function (elt) #)(partial-comple= tion) mapc(#f(compiled-function (elt) #) (eglot--d= umb-flex basic partial-completion emacs22)) seq-do(#f(compiled-function (elt) #) (eglot-= -dumb-flex basic partial-completion emacs22)) seq-some(#f(compiled-function (style) #) (eg= lot--dumb-flex basic partial-completion emacs22)) completion--nth-completion(1 "len" #f(compiled-function (pattern pred act= ion) #) nil 3 (metadata (category . eglot-capf= ) (display-sort-function . #f(compiled-function (completions) #)))) completion-try-completion("len" #f(compiled-function (pattern pred action= ) #) nil 3 (metadata (category . eglot-capf) (= display-sort-function . #f(compiled-function (completions) #)))) ivy-completion-in-region(# 38 #f(compiled-f= unction (pattern pred action) #) nil) completion-in-region(# 38 #f(compiled-funct= ion (pattern pred action) #) nil) completion-at-point() complete-symbol(nil) funcall-interactively(complete-symbol nil) call-interactively(complete-symbol nil nil) command-execute(complete-symbol)