Skip to content

LSP/Emacs hangs while updating metals server #91

Open
@shardulc

Description

@shardulc

Describe the bug
I tried to upgrade to Metals 0.11.10 from within Emacs by running lsp-update-server. The Emacs echo area then showed "Contacting host github.com:443 ..." and then hanged. (Emacs wouldn't respond to any further input and had to be killed.) The same happened when I tried lsp-install-server, and when I tried again after lsp-uninstall-server. That last command deleted ~/.emacs.d/.cache/lsp/metals/metals which was previously an executable file.

Finally, I quit Emacs and installed Metals via cs install metals. Then, I symlinked ~/.emacs.d/.cache/lsp/metals/metals to the coursier-installed Metals. Then, I restarted Emacs and opened a Scala project, and LSP started my new, manually installed version of Metals without issue.

To Reproduce
Versions of software:

  • Emacs 28.1
  • lsp-mode 20230206.1806
  • lsp-metals 20221102.1628
  • Coursier 2.1.0-M6-28-gbad85693f
  • Metals 0.11.9 (or could have been 0.11.8)
  • Ubuntu 22.04 LTS

From Emacs, run M-x lsp-update-server RET metals RET.

Expected behavior
The Metals server that LSP had previously automatically installed under ~/.emacs.d/.cache/lsp/metals/ should be updated. If there is genuinely a network connectivity issue (which I highly doubt there was in my case), the update should fail instead of hanging on "contacting host".

Happy to provide additional information if needed. But replicating might be tricky now because I manually upgraded to Metals 0.11.10 as described above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions