From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#61637: 30.0.50; Fix Eglot tests that need HOME=~USER Date: Sat, 04 Mar 2023 14:46:35 +0200 Message-ID: <83sfekadlg.fsf@gnu.org> References: <87ilfxv5dg.fsf@tcd.ie> <87h6vgelnn.fsf@tcd.ie> <83leksv6az.fsf@gnu.org> <87bkl972du.fsf@gmail.com> <83a60tarif.fsf@gnu.org> <87v8jg68l0.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27629"; mail-complaints-to="usenet@ciao.gmane.io" Cc: contovob@tcd.ie, 61637@debbugs.gnu.org To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Mar 04 13:48:31 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pYRJO-0006xn-A7 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 04 Mar 2023 13:48:30 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pYRJ6-0004qI-G2; Sat, 04 Mar 2023 07:48:12 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pYRIw-0004pJ-KV for bug-gnu-emacs@gnu.org; Sat, 04 Mar 2023 07:48:06 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pYRIw-0004Y3-CP for bug-gnu-emacs@gnu.org; Sat, 04 Mar 2023 07:48:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pYRIw-0004rF-1P for bug-gnu-emacs@gnu.org; Sat, 04 Mar 2023 07:48:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 04 Mar 2023 12:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61637 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 61637-submit@debbugs.gnu.org id=B61637.167793402218464 (code B ref 61637); Sat, 04 Mar 2023 12:48:02 +0000 Original-Received: (at 61637) by debbugs.gnu.org; 4 Mar 2023 12:47:02 +0000 Original-Received: from localhost ([127.0.0.1]:35416 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYRHy-0004nk-BT for submit@debbugs.gnu.org; Sat, 04 Mar 2023 07:47:02 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:50248) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYRHv-0004nG-TB for 61637@debbugs.gnu.org; Sat, 04 Mar 2023 07:47:01 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pYRHk-000449-OH; Sat, 04 Mar 2023 07:46:53 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=aWfh4gJvspRCpbSAKoCSf6NUA95jS0HMX73aiqGk00o=; b=qZjPMR6H/XIpqw+xPEEQ wMsWAwRh09rIK052gfOvcGM92hAiSGjap/M2v0lRxd8TrehbRf+6kyG2O6g/V+ISBXDtQYjCxkMTa GwTBgdjdq52ZEbGa6nvvCN4eYXv3YA+sP9F9U49ix0FtzLhA3gkB5rx7UL0v6NrZZ9sXf3guCBQkc UgubP48SB88h1n5HYpvK6DSZ80WyRw7dQ530T+0RWFQk5dpMqkOU78Lwm6QCEHYLYzHMqpFE7IwlQ 3OzMpJiS17lv+AotNnCFiy1d1cc6hf1JTRU0ut0PpkpoiISX4LZhgfeaCeSv7lCeB5uS66feVFx2d /UTvZQvnRVthUA==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pYRHj-0006PK-Bc; Sat, 04 Mar 2023 07:46:48 -0500 In-Reply-To: <87v8jg68l0.fsf@gmail.com> (message from =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= on Sat, 04 Mar 2023 11:48:27 +0000) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:257278 Archived-At: > From: João Távora > Cc: contovob@tcd.ie, 61637@debbugs.gnu.org > Date: Sat, 04 Mar 2023 11:48:27 +0000 > > Eli Zaretskii writes: > > >> From: João Távora > >> Cc: "Basil L. Contovounesios" , 61637@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?