GNU bug report logs -
#61637
30.0.50; Fix Eglot tests that need HOME=~USER
Previous Next
Reported by: "Basil L. Contovounesios" <contovob <at> tcd.ie>
Date: Sun, 19 Feb 2023 19:16:02 UTC
Severity: minor
Tags: patch
Found in version 30.0.50
Fixed in version 30.1
Done: Basil Contovounesios <contovob <at> tcd.ie>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> From: João Távora <joaotavora <at> gmail.com>
> Cc: contovob <at> tcd.ie, 61637 <at> debbugs.gnu.org
> Date: Sat, 04 Mar 2023 11:48:27 +0000
>
> Eli Zaretskii <eliz <at> gnu.org> writes:
>
> >> From: João Távora <joaotavora <at> gmail.com>
> >> Cc: "Basil L. Contovounesios" <contovob <at> tcd.ie>, 61637 <at> debbugs.gnu.org
> >> Date: Sat, 04 Mar 2023 01:04:45 +0000
> >>
> >> I installed some language servers like clangd, rust-analyzer and pylsp,
> >> and they need to a valid HOME to be able to function.
> >
> > Please tell more about this: what exactly do these servers need from
> > the home directory?
>
> Every server is different. This is the complain for a pylsp installed
> with 'pip install pylsp' for the regular user, which you can find in the
> output of e.g.
>
> make -C test lisp/progmodes/eglot-tests SELECTOR='"basic-completions"'
>
> This are the relevant parts of the output. Here, it looks like the
> pylsp trampoline in ~/.local/bin/pylsp can't find the main supporing
> library, which probably lives around the corner in
> ~/.local/lib/python3.10/site-packages.
Is it reasonable to have an LSP installed in the HOME directory when
running the Emacs test suite, when we clearly document that HOME is
ignored for these tests?
How about if we ask users who install LSP servers under their home
directory to somehow specify the exact location of that installation,
so that the LSP will find its components, but Emacs won't access any
files in the user's HOME via the "~" shortcut?
> > As I said, I don't like the idea of using the user's real home
> > directory for test purposes. We could end up clobbering precious
> > files there. We could also have tests fail because some user setting
> > in the home directory makes the test results unpredictable.
>
> As I understand it, the concern of cloberring user customizations is
> mostly related to Emacs' own packages like ido or auto-save-mode, some
> of them do write files in ~/.emacs.d and similar. That is reasonable.
>
> But this is different IMO. We're talking about user-installed language
> servers, which presumably these users are already using (because they
> installed them). Only for the specific invocations of these servers is
> HOME spoofed. Overall I think the risk is low. Eglot has had these
> types of tests since practically the beginning and I've never had
> complains of clobbered files.
You disregarded the second part of my reasoning, which has to do with
the test results being non-deterministic once the user's real home
directory is accessible to Emacs. How do we overcome that?
This bug report was last modified 2 years and 106 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.