From: "João Távora" <joaotavora@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: "Basil L. Contovounesios" <contovob@tcd.ie>, 61637@debbugs.gnu.org
Subject: bug#61637: 30.0.50; Fix Eglot tests that need HOME=~USER
Date: Sat, 04 Mar 2023 01:04:45 +0000 [thread overview]
Message-ID: <87bkl972du.fsf@gmail.com> (raw)
In-Reply-To: <83leksv6az.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 20 Feb 2023 15:02:12 +0200")
Hi Eli, Basil
I've recently bumped into this problem myself. As I've been doing more
development on Eglot recently, running the test suite becomes a real
necessity.
I installed some language servers like clangd, rust-analyzer and pylsp,
and they need to a valid HOME to be able to function. Bare 'make check'
always fails for me as of late. If one happens to have the servers
installed, the problem is twofold:
* For Eglot developers, it's impossible to batch-test Eglot
* For other devs who are doing changes elsewhere and looking for
breakage, they'll have to reason about the 'make check' failure.
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?
> Why not do this the other way around: trick Eglot to think the home
> directory doesn't exist (as I understand it already knows how to
> handle this)?
I don't understand what you mean: this is entirely constrained to how
certain language servers work, so eglot.el itself can't handle it.
João
next prev parent reply other threads:[~2023-03-04 1:04 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-19 19:10 bug#61637: 30.0.50; Fix Eglot tests that need HOME=~USER Basil L. Contovounesios via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-19 19:38 ` João Távora
2023-02-20 9:22 ` Basil L. Contovounesios via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-20 9:30 ` João Távora
2023-02-20 13:02 ` Eli Zaretskii
2023-03-04 1:04 ` João Távora [this message]
2023-03-04 7:46 ` Eli Zaretskii
2023-03-04 11:48 ` João Távora
2023-03-04 12:46 ` Eli Zaretskii
2023-03-04 13:23 ` João Távora
2023-03-04 15:04 ` Eli Zaretskii
2023-03-04 17:21 ` Basil Contovounesios via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-04 19:35 ` João Távora
2023-03-04 17:28 ` Basil Contovounesios via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-04 19:22 ` João Távora
2023-04-10 10:09 ` Basil Contovounesios via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-04 17:20 ` Basil Contovounesios via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-04 17:26 ` Basil Contovounesios via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-04 19:19 ` João Távora
2023-03-04 17:19 ` Basil Contovounesios via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-04 18:09 ` Eli Zaretskii
2023-03-04 19:27 ` João Távora
2023-03-04 19:25 ` João Távora
2023-02-20 13:01 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87bkl972du.fsf@gmail.com \
--to=joaotavora@gmail.com \
--cc=61637@debbugs.gnu.org \
--cc=contovob@tcd.ie \
--cc=eliz@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.