GNU bug report logs - #77948
Eglot: Allow other keys in window/logMessage

Previous Next

Package: emacs;

Reported by: Grégoire Duchêne <gduchene <at> awhk.org>

Date: Mon, 21 Apr 2025 03:27:02 UTC

Severity: normal

Done: João Távora <joaotavora <at> gmail.com>

To reply to this bug, email your comments to 77948 AT debbugs.gnu.org.
There is no need to reopen the bug first.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#77948; Package emacs. (Mon, 21 Apr 2025 03:27:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Grégoire Duchêne <gduchene <at> awhk.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 21 Apr 2025 03:27:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Grégoire Duchêne <gduchene <at> awhk.org>
To: bug-gnu-emacs <at> gnu.org
Subject: Eglot: Allow other keys in window/logMessage
Date: Sun, 20 Apr 2025 20:00:51 +0100
[Message part 1 (text/plain, inline)]
Hello GNU Emacs folks!

I’ve recently noticed lots of error messages printed by Eglot when
working on a Swift project:

  Error running timer: (error "Keyword argument :logName not one of
  (:type :message)") [2 times]

After digging a little bit, I found out that SourceKit-LSP is now
sending window/logMessage messages with a ‘logName’ field set [0], which
is not defined in the LSP specification [1].

Since Eglot isn’t doing anything particular with those messages, I think
it would be reasonable to allow other keys in that message.

Here’s how to reproduce the issue:
  1. Install swift-mode.
  2. Configure Eglot to support SourceKit-LSP:
       (use-package eglot
         :config (add-to-list 'eglot-server-programs
                              '(swift-mode . ("sourcekit-lsp")))  
         :defer t)
  3. Create an empty Swift 6.1 project:
     - mkdir /tmp/EglotTest; cd /tmp/EglotTest
     - swift package init
  4. Open the Package.swift file, enable Eglot, and take a look at the
     messages buffer.

I’m attaching a patch that fixes the issue. Let me know what you think!


Thanks,
-- gregoire

[0]: https://github.com/swiftlang/sourcekit-lsp/blob/12dc0483e32378a2f3c5afcc8337bd977644f182/Sources/LanguageServerProtocol/Notifications/LogMessageNotification.swift#L27-L37
[1]: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#window_logMessage
[0001-Eglot-Allow-other-keys-in-window-logMessage.patch (application/octet-stream, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#77948; Package emacs. (Sat, 03 May 2025 08:01:01 GMT) Full text and rfc822 format available.

Message #8 received at 77948 <at> debbugs.gnu.org (full text, mbox):

From: Grégoire Duchêne <gduchene <at> awhk.org>
To: 77948 <at> debbugs.gnu.org
Cc: João Távora <joaotavora <at> gmail.com>
Subject: Re: bug#77948: Acknowledgement (Eglot: Allow other keys in
 window/logMessage)
Date: Sat, 03 May 2025 09:00:02 +0100
Hi João,

Apologies for Cc’ing you directly, but I’d be interested to hear your
thoughts on https://debbugs.gnu.org/cgi/bugreport.cgi?bug=77948!


Thanks, 
-- gregoire




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#77948; Package emacs. (Sun, 04 May 2025 07:29:02 GMT) Full text and rfc822 format available.

Message #11 received at 77948 <at> debbugs.gnu.org (full text, mbox):

From: João Távora <joaotavora <at> gmail.com>
To: Grégoire Duchêne <gduchene <at> awhk.org>
Cc: 77948 <at> debbugs.gnu.org
Subject: Re: bug#77948: Acknowledgement (Eglot: Allow other keys in
 window/logMessage)
Date: Sun, 4 May 2025 08:28:28 +0100
Thanks,

Should be fixed in latest master:

commit 660ebdddf6583e447b50f6574dca4ca8ff42ef60 (HEAD -> master)
Author: João Távora <joaotavora <at> gmail.com>
Date:   Sun May 4 08:27:13 2025 +0100

    Eglot: allow other keys in window/logMessage (bug#77948)

    * lisp/progmodes/eglot.el (eglot-handle-notification
window/logMessage): Fix.

Please test,
João

On Sat, May 3, 2025 at 9:00 AM Grégoire Duchêne <gduchene <at> awhk.org> wrote:
>
> Hi João,
>
> Apologies for Cc’ing you directly, but I’d be interested to hear your
> thoughts on https://debbugs.gnu.org/cgi/bugreport.cgi?bug=77948!
>
>
> Thanks,
> -- gregoire



-- 
João Távora




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#77948; Package emacs. (Sun, 04 May 2025 11:02:02 GMT) Full text and rfc822 format available.

Message #14 received at 77948 <at> debbugs.gnu.org (full text, mbox):

From: Grégoire Duchêne <gduchene <at> awhk.org>
To: João Távora <joaotavora <at> gmail.com>
Cc: 77948 <at> debbugs.gnu.org
Subject: Re: bug#77948: Acknowledgement (Eglot: Allow other keys in
 window/logMessage)
Date: Sun, 04 May 2025 12:00:57 +0100
Hi,

On Sun, May 4, 2025, at 08:28, João Távora wrote:
> Please test,

Just tested on my sample project with a version compiled at 660ebdddf65,
everything looks good!


Thanks,
-- gregoire




Reply sent to João Távora <joaotavora <at> gmail.com>:
You have taken responsibility. (Tue, 06 May 2025 10:00:06 GMT) Full text and rfc822 format available.

Notification sent to Grégoire Duchêne <gduchene <at> awhk.org>:
bug acknowledged by developer. (Tue, 06 May 2025 10:00:07 GMT) Full text and rfc822 format available.

Message #19 received at 77948-done <at> debbugs.gnu.org (full text, mbox):

From: João Távora <joaotavora <at> gmail.com>
To: Grégoire Duchêne <gduchene <at> awhk.org>
Cc: 77948-done <at> debbugs.gnu.org
Subject: Re: bug#77948: Acknowledgement (Eglot: Allow other keys in
 window/logMessage)
Date: Tue, 06 May 2025 11:00:28 +0100
Grégoire Duchêne <gduchene <at> awhk.org> writes:

>> Please test,
> Just tested on my sample project with a version compiled at 660ebdddf65,
> everything looks good!

Great.  Closing.




This bug report was last modified 6 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.