unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Brennan Vincent" <brennan@umanwizard.com>
To: "João Távora" <joaotavora@gmail.com>
Cc: Eli Zaretskii <eliz@gnu.org>,
	73279@debbugs.gnu.org, Dmitry Gutov <dgutov@yandex.ru>
Subject: bug#73279: [PATCH] Eglot: use immediate-mode eglot--request for :completionItem/resolve
Date: Wed, 25 Sep 2024 11:14:07 -0400	[thread overview]
Message-ID: <877caz935s.fsf@denver.mail-host-address-is-not-set> (raw)
In-Reply-To: <87y13r5xzk.fsf@taipei.mail-host-address-is-not-set>

Hi João,

Did you get a chance to take a look at my last message? Let me know if I
need to provide any further information.

Thanks
Brennan

"Brennan Vincent" <brennan@umanwizard.com> writes:

> João Távora <joaotavora@gmail.com> writes:
>
>> On Mon, Sep 16, 2024 at 4:50 PM João Távora <joaotavora@gmail.com> wrote:
>>>
>>> On Mon, Sep 16, 2024 at 4:40 PM João Távora <joaotavora@gmail.com> wrote:
>>> >
>>> > On Mon, Sep 16, 2024 at 4:17 PM Brennan Vincent <brennan@umanwizard.com> wrote:
>>> >
>>> > > As for the regression: yes, it's a regression from 29.4, and in fact I
>>> > > have bisected to the commit that regressed it:
>>> > > a8c1559a663d9bc21776e33303251e244f86f0d7
>>> >
>>> > Oh alright, that clears it up.  It was an oversight indeed, so I think
>>> > your patch is TRT.  I'll install it in emacs-30.
>>>
>>> Actually, not so fast.  The code before that allegedly broken commit
>>> _also_ sent outstanding changes to the server before resolving
>>> (via the advice that was then removed).
>
> Not according to my testing.
>
> And, taking a look at the old code:
>
> (advice-add #'jsonrpc-request :before
>             (cl-function (lambda (_proc _method _params &key
>                                         deferred &allow-other-keys)
>                            (when (and eglot--managed-mode deferred)
>                              (eglot--signal-textDocument/didChange))))
>             '((name . eglot--signal-textDocument/didChange)))
>
> It seems that we are only sending the changes if the function is called
> with the :deferred flag. The function was NOT called with the :deferred
> flag at the site in question, which as of 093a36 (parent of a8c1559)
> looked like this:
>
> (jsonrpc-request server :completionItem/resolve
>                  lsp-comp :cancel-on-input t)
>
>>>
>>> So I must be missing something, and must investigate more
>>> closely.
>>
>> Brennan, can you provide an excerpt of the Eglot event log
>> (M-x eglot-events-buffer) for your MRE recipe before and
>> after a8c1559a663d9bc21776e33303251e244f86f0d7?
>>
>
> Sure. See attachments. They are a bit long because of the huge doc
> strings rust-analyzer includes, but you should get the idea by searching
> for textDocument/completion.
>
> Note that in BEFORE, we send textDocument/completion, immediately followed by
> completionItem/resolve. In AFTER, we send textDocument/completion, then
> textDocument/didChange, then completionItem/resolve.
>
> (snip)
>
>> It should highlight what has changed in the client-server
>> communication, if anything.
>>
>> João






  reply	other threads:[~2024-09-25 15:14 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-15 19:22 bug#73279: [PATCH] Eglot: use immediate-mode eglot--request for :completionItem/resolve Brennan Vincent
2024-09-16 11:28 ` Eli Zaretskii
2024-09-16 13:43   ` João Távora
2024-09-16 15:17     ` Brennan Vincent
2024-09-16 15:40       ` João Távora
2024-09-16 15:50         ` João Távora
2024-09-16 16:21           ` João Távora
2024-09-16 17:06             ` Brennan Vincent
2024-09-25 15:14               ` Brennan Vincent [this message]
2024-09-26 10:27                 ` João Távora
2024-09-26 10:58                   ` Eli Zaretskii

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=877caz935s.fsf@denver.mail-host-address-is-not-set \
    --to=brennan@umanwizard.com \
    --cc=73279@debbugs.gnu.org \
    --cc=dgutov@yandex.ru \
    --cc=eliz@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).