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
Basil Contovounesios <contovob <at> tcd.ie> writes:
> João Távora [2023-03-04 01:04 +0000] wrote:
>
>> Another option is to have eglot-tests.el read a new environment var:
>>
>> diff --git a/test/lisp/progmodes/eglot-tests.el b/test/lisp/progmodes/eglot-tests.el
>> index 5d5de59a19a..ad994915c52 100644
>> --- a/test/lisp/progmodes/eglot-tests.el
>> +++ b/test/lisp/progmodes/eglot-tests.el
>> @@ -116,9 +116,7 @@ eglot--call-with-fixture
>> ;; installations for LSP servers like pylsp, making
>> ;; these tests mostly useless, so we hack around it
>> ;; here with a great big hack.
>> - ,(format "HOME=%s"
>> - (if (file-exists-p home) home
>> - (format "/home/%s" (getenv "USER")))))
>> + ,(format "HOME=%s" (or (getenv "EGLOT_REAL_HOME") (getenv "HOME"))))
>> process-environment))
>> ;; Prevent "Can't guess python-indent-offset ..." messages.
>> (python-indent-guess-indent-offset-verbose . nil)
>>
>> This is acceptable for Eglot devs like me, but other devs that don't
>> know about this variable will still be confused. WDYT?
>
> So the suggestion is for parties interested in running the full
> unadulterated Eglot suite to set this environment variable, thus opting
> into using their HOME or any other HOME-like environment they may have
> set up?
>
> If so, sounds fine to me, thanks,
Yes that would be the suggestion, but it still has considerable drawback
that non-Eglot devs looking just to check that they didn't break
anything and who _do_ happen to have these servers installed will still
see test failures in Eglot that are hard to diagnose. They likely won't
know about EGLOT_REAL_HOME, and neither should they, really.
This solution would only be acceptable if PATH was _also_ spoofed (and
then unspoofed on request). Bug spoofing PATH is a taller order, since
it's hard to know what are platform specific system paths and what are
"user paths".
João
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.