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#62004: 30.0.50; comp-run-async-workers failure when default-directory deleted Date: Tue, 07 Mar 2023 18:14:26 +0200 Message-ID: <83ilfc5yjh.fsf@gnu.org> References: <874jqxyhfo.fsf@gmail.com> <83sfeh7rlm.fsf@gnu.org> <87zg8px01l.fsf@gmail.com> <83mt4p7mv4.fsf@gnu.org> <87v8jdww42.fsf@gmail.com> <83jzzt7iac.fsf@gnu.org> <87jzztwo9h.fsf@gmail.com> <83h6ux6xwl.fsf@gnu.org> <831qm07lba.fsf@gnu.org> <83o7p463zt.fsf@gnu.org> <87mt4otw1x.fsf@gmail.com> <87ilfctv36.fsf@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36462"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 62004@debbugs.gnu.org, iarchivedmywholelife@gmail.com To: Andrea Corallo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Mar 07 17:15:52 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 1pZZyh-0009Kw-Tw for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 07 Mar 2023 17:15:52 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pZZxx-0004k1-VZ; Tue, 07 Mar 2023 11:15:05 -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 1pZZxu-0004jR-SY for bug-gnu-emacs@gnu.org; Tue, 07 Mar 2023 11:15:02 -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 1pZZxu-0004nD-IQ for bug-gnu-emacs@gnu.org; Tue, 07 Mar 2023 11:15:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pZZxu-0002Ry-EM for bug-gnu-emacs@gnu.org; Tue, 07 Mar 2023 11:15: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: Tue, 07 Mar 2023 16:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62004 X-GNU-PR-Package: emacs Original-Received: via spool by 62004-submit@debbugs.gnu.org id=B62004.16782056799374 (code B ref 62004); Tue, 07 Mar 2023 16:15:02 +0000 Original-Received: (at 62004) by debbugs.gnu.org; 7 Mar 2023 16:14:39 +0000 Original-Received: from localhost ([127.0.0.1]:47051 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pZZxW-0002R7-Sp for submit@debbugs.gnu.org; Tue, 07 Mar 2023 11:14:39 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:47206) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pZZxU-0002Qu-GS for 62004@debbugs.gnu.org; Tue, 07 Mar 2023 11:14:36 -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 1pZZxP-0004g2-9o; Tue, 07 Mar 2023 11:14:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=ixZzPUAsJMuP3IoeWSX6FyxhEiiaKxQPeiXXe7xoW5E=; b=Ca9jRbDCe/9S 4IB9bWW0uO4lxENh+Fo06VoFWX0E1SyuF1Z2fDadE+NxyrCczPY72RHLOhklvl+5I9UWmVwqv4INq qBk4rqP2HJV6UUNYYdTfvTVSezPHpb9rbWfbd4ZWCxe/pqtHbF4R6DQUxIXJnHXad0utDd9qmRjRm FfOrRgR049Jl3+k6KIpDJgdnwJM+EaJ4EA8tdMEm5Zuxqat7KNt6eCoiAkaBhRMLL3Yge28GLwJdI xHfbrjBKmPlbppvU759YEII7YS8HPh16EmQ73rG4hNttyRGjITeSVbS1aEHxdstbxvq9ySQwbcZgF IVL7fv3YBO04G2ib0sAg8w==; 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 1pZZxO-0002Dw-NP; Tue, 07 Mar 2023 11:14:31 -0500 In-Reply-To: (message from Andrea Corallo on Tue, 07 Mar 2023 16:06:56 +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:257482 Archived-At: > From: Andrea Corallo > Cc: Eli Zaretskii , 62004@debbugs.gnu.org > Date: Tue, 07 Mar 2023 16:06:56 +0000 > > No Wayman writes: > > > No Wayman writes: > > > >> Binding default-directory makes sense. > >> It's just a matter of what to bind it to. > >> I see that `comp-run-async-workers` calls `make-temp-file' > >> internally. > >> Binding default-directory to temporary-file-directory around the > >> call to > >> `make-process' will prevent this error and seems like a safe bet. > > > > The attached patch implements this and fixes the error on my end. >From fd33c2d58ac078ed53cdada5fa6e378e59247a3a Mon Sep 17 00:00:00 2001 > > From: Nicholas Vollmer > > Date: Tue, 7 Mar 2023 10:44:17 -0500 > > Subject: [PATCH] comp.el (comp-run-async-workers): bind default-directory > > > > Ensure default-directory exists prior to creating subprocess. (bug#62004) > > --- > > lisp/emacs-lisp/comp.el | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el > > index ce81680a226..97cfa27a1aa 100644 > > --- a/lisp/emacs-lisp/comp.el > > +++ b/lisp/emacs-lisp/comp.el > > @@ -4023,6 +4023,7 @@ comp-run-async-workers > > (comp-log "\n") > > (mapc #'comp-log expr-strings))) > > (load1 load) > > + (default-directory temporary-file-directory) > > (process (make-process > > :name (concat "Compiling: " source-file) > > :buffer (with-current-buffer > > If tested LGTM, another option (maybe safer?) would be to use > `invocation-directory'. I think I'd prefer invocation-directory, indeed.