GNU bug report logs - #61312
Patch for eglot: scala LSP binary name

Previous Next

Package: emacs;

Reported by: skykanin <skykanin <at> proton.me>

Date: Mon, 6 Feb 2023 05:52:02 UTC

Severity: normal

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 61312 in the body.
You can then email your comments to 61312 AT debbugs.gnu.org in the normal way.

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#61312; Package emacs. (Mon, 06 Feb 2023 05:52:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to skykanin <skykanin <at> proton.me>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 06 Feb 2023 05:52:02 GMT) Full text and rfc822 format available.

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

From: skykanin <skykanin <at> proton.me>
To: "bug-gnu-emacs <at> gnu.org" <bug-gnu-emacs <at> gnu.org>
Subject: Patch for eglot: scala LSP binary name
Date: Sun, 05 Feb 2023 21:15:48 +0000
[Message part 1 (text/plain, inline)]
Hello,

It seems that eglot expects the scala metals LSP server binary to be named `metals-emacs` instead of `metals`. The included patch fixes this behaviour. At least in the nix package manager the `metals` binary is simply call 'metals'. However if other package managers distribute an alias for the binary as 'metals-emacs' as well we could instead do something like:
```
(scala-mode . ,(eglot-alternatives '("metals" "metals-emacs"))
```
[0001-Patch-eglot-scala-LSP-server-binary-name.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#61312; Package emacs. (Mon, 06 Feb 2023 15:47:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: skykanin <skykanin <at> proton.me>, João Távora
 <joaotavora <at> gmail.com>
Cc: 61312 <at> debbugs.gnu.org
Subject: Re: bug#61312: Patch for eglot: scala LSP binary name
Date: Mon, 06 Feb 2023 17:46:23 +0200
> Date: Sun, 05 Feb 2023 21:15:48 +0000
> From:  skykanin via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> 
> It seems that eglot expects the scala metals LSP server binary to be named `metals-emacs` instead of `metals`. The included patch fixes this behaviour. At least in the nix package manager the `metals` binary is simply call 'metals'. However if other package managers distribute an alias for the binary as 'metals-emacs' as well we could instead do something like:
> ```
> (scala-mode . ,(eglot-alternatives '("metals" "metals-emacs"))
> ```

Looking at this site:

  https://github.com/rossabaker/lsp-scala

I see this:

  (defcustom lsp-scala-server-command "metals-emacs"
    "The command to launch the Scala language server."
    :group 'lsp-scala
  :type 'file)

So maybe we do need to support both names.

João, WDYT?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#61312; Package emacs. (Mon, 06 Feb 2023 18:46:02 GMT) Full text and rfc822 format available.

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

From: João Távora <joaotavora <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 61312 <at> debbugs.gnu.org, skykanin <skykanin <at> proton.me>
Subject: Re: bug#61312: Patch for eglot: scala LSP binary name
Date: Mon, 6 Feb 2023 18:45:39 +0000
[Message part 1 (text/plain, inline)]
Hi, Eli,

As usual, I defer this decision to you. I think it's reasonable to
support both names, and I also think it's reasonable to stick to
just the one we think is most used or representative of the
program.

In this case, I think "metals-emacs" is a contradiction of LSP's
stated goal, which is to have editor-agnostic servers. But I
don't know what the reasons were for doing this, I haven't
investigated.

It would be even more reasonable, I think, if distributions
settled -- or mostly settled - on names for their binaries they
distribute, much like *nix toolchains do. Of course we do not
control that process, but maybe we could influence it instead
of being constantly influenced by it.

João
[Message part 2 (text/html, inline)]

Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Thu, 09 Feb 2023 10:19:01 GMT) Full text and rfc822 format available.

Notification sent to skykanin <skykanin <at> proton.me>:
bug acknowledged by developer. (Thu, 09 Feb 2023 10:19:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: João Távora <joaotavora <at> gmail.com>
Cc: 61312-done <at> debbugs.gnu.org, skykanin <at> proton.me
Subject: Re: bug#61312: Patch for eglot: scala LSP binary name
Date: Thu, 09 Feb 2023 12:18:12 +0200
> From: João Távora <joaotavora <at> gmail.com>
> Date: Mon, 6 Feb 2023 18:45:39 +0000
> Cc: skykanin <skykanin <at> proton.me>, 61312 <at> debbugs.gnu.org
> 
> As usual, I defer this decision to you. I think it's reasonable to
> support both names, and I also think it's reasonable to stick to 
> just the one we think is most used or representative of the 
> program.
> 
> In this case, I think "metals-emacs" is a contradiction of LSP's
> stated goal, which is to have editor-agnostic servers. But I 
> don't know what the reasons were for doing this, I haven't
> investigated.
> 
> It would be even more reasonable, I think, if distributions 
> settled -- or mostly settled - on names for their binaries they 
> distribute, much like *nix toolchains do. Of course we do not 
> control that process, but maybe we could influence it instead
> of being constantly influenced by it.

Thanks, I went with supporting both names in Emacs 29.  I cannot see
any harm in supporting both, once "metals" is the first name to check.

With that, I'm closing this bug.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 09 Mar 2023 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 42 days ago.

Previous Next


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