bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#61637: 30.0.50; Fix Eglot tests that need HOME=~USER


From: Basil Contovounesios
Subject: bug#61637: 30.0.50; Fix Eglot tests that need HOME=~USER
Date: Sat, 04 Mar 2023 17:28:49 +0000
User-agent: Gnus/5.13 (Gnus v5.13)

Eli Zaretskii [2023-03-04 14:46 +0200] wrote:

> 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?

The fact that I have LSP servers installed under HOME is orthogonal to
the fact that I also happen to frequently run the Emacs test suite,
regardless of what the Emacs test suite chooses to do with the HOME
environment variable.

The purpose of this bug report is to teach eglot-tests.el to gracefully
handle such installations, which IME are increasingly common.

I'm not particularly bothered whether that's achieved by filtering
exec-path, skipping problematic tests, or...

> 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?

...some such mechanism of specifying a HOME-like substitute, like João's
earlier EGLOT_REAL_HOME suggestion.

>> > 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?

Any of the suggestions I've enumerated so far sounds plausible to me.
But I'd appreciate some feedback on which combination if any is
preferred before proceeding to suggest a new patchset (unless João beats
me to it).

Thanks,

-- 
Basil





reply via email to

[Prev in Thread] Current Thread [Next in Thread]