Subject: bug#77948: closed (Re: bug#77948: Acknowledgement (Eglot: Allow other keys in window/logMessage))

From: [email-masked] (GNU bug Tracking System)
Date: Tue, 06 May 2025 10:00:07 +0000

Your bug report

#77948: Eglot: Allow other keys in window/logMessage

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
77948: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=77948
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#77948: Acknowledgement (Eglot: Allow other keys in window/logMessage)
From: João Távora <[email-masked]>
To: Grégoire Duchêne <[email-masked]>
Cc: [email-masked]
Date: Tue, 06 May 2025 11:00:28 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Grégoire Duchêne <[email-masked]> writes:

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

Great.  Closing.

Subject: Eglot: Allow other keys in window/logMessage
From: Grégoire Duchêne <[email-masked]>
To: [email-masked]
Date: Sun, 20 Apr 2025 20:00:51 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

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