From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#57562: [PATCH] * lisp/emacs-lisp/comp.el (comp-run-async-workers): Fail more gracefully Date: Sat, 03 Sep 2022 11:24:02 -0400 Message-ID: References: <83wnakmqw6.fsf@gnu.org> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33332"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 57562@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Sep 03 17:25:23 2022 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 1oUV1O-0008RJ-Oh for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 03 Sep 2022 17:25:22 +0200 Original-Received: from localhost ([::1]:53188 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oUV1N-00035o-99 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 03 Sep 2022 11:25:21 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51822) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oUV15-00035b-2P for bug-gnu-emacs@gnu.org; Sat, 03 Sep 2022 11:25:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53921) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oUV14-00019x-PU for bug-gnu-emacs@gnu.org; Sat, 03 Sep 2022 11:25:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oUV14-0008ME-Ap for bug-gnu-emacs@gnu.org; Sat, 03 Sep 2022 11:25:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 03 Sep 2022 15:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57562 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 57562-submit@debbugs.gnu.org id=B57562.166221865732070 (code B ref 57562); Sat, 03 Sep 2022 15:25:02 +0000 Original-Received: (at 57562) by debbugs.gnu.org; 3 Sep 2022 15:24:17 +0000 Original-Received: from localhost ([127.0.0.1]:42620 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oUV0L-0008LC-G7 for submit@debbugs.gnu.org; Sat, 03 Sep 2022 11:24:17 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:46717) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oUV0J-0008Ky-7B for 57562@debbugs.gnu.org; Sat, 03 Sep 2022 11:24:15 -0400 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 83CC4101120; Sat, 3 Sep 2022 11:24:09 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id C30BF1001F3; Sat, 3 Sep 2022 11:24:03 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1662218643; bh=ZslAxs7Q2ueNg3ceiBdZ4sq1GbDwkTGRwX33C/CYG7o=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=c05XbERaGzkN6/U+mgE2TW8QNHp3sqVjd3LCJ0GF//6U09SnMgwWzszuqKSWqf3AC 5QKKbpri6JzS8EeP/0CqkwbIUP7EAtU+9sit4n3obt8tMCoHTFxFnQgZCG/mnFe45J fNJ+WkdJ8sUtX5i3aI5HotjURwktA3cTVA41vg5kWjxBkC8Xkl9Uai/tNXv+rh84LQ pSwLA3fgAumPGigEptc0R57CmvVBOeHQdv/WWoyrzwqgOsvHSouHchXzJqA+idcmbW bzgFlQf2CbVhIGA+cGwFi4QOeGkl4nmNv1jziJC/Avi93gWWDJe14TeVvPnNLjhvpa Y6W8JChpHzhnw== Original-Received: from pastel (unknown [157.52.9.190]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 9AA83120911; Sat, 3 Sep 2022 11:24:03 -0400 (EDT) In-Reply-To: <83wnakmqw6.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 03 Sep 2022 18:14:33 +0300") 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" Xref: news.gmane.io gmane.emacs.bugs:241415 Archived-At: --=-=-= Content-Type: text/plain > I have trouble seeing the actual change amongst unrelated whitespace > changes. Please show a patch with the minimal necessary change, > without all the reformatting. Emacs 28.2 is so close to a release > that playing whitespace and formatting games is not appropriate there. Hmm... looks like I sent the patch I had on `master`, sorry. Here is the cleaner `emacs-28` version. Stefan --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=comp.patch commit 516d2ea5e958866120f1c2d04771c04d1f5a4425 Author: Stefan Monnier Date: Sat Sep 3 11:03:01 2022 -0400 * lisp/emacs-lisp/comp.el (comp-run-async-workers): Fail more gracefully Otherwise Emacs may fail to start if it can't find a writable `~/.emacs.d/eln-cache` directory. See Debian's bug #1017739. diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index 374b39e9990..a5ab12ae388 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el @@ -3927,8 +3927,11 @@ comp-run-async-workers when (or native-comp-always-compile load ; Always compile when the compilation is ; commanded for late load. - (file-newer-than-file-p - source-file (comp-el-to-eln-filename source-file))) + ;; Skip compilation if `comp-el-to-eln-filename' fails + ;; to find a writable directory. + (with-demoted-errors "Async compilation :%S" + (file-newer-than-file-p + source-file (comp-el-to-eln-filename source-file)))) do (let* ((expr `((require 'comp) ,(when (boundp 'backtrace-line-length) `(setf backtrace-line-length ,backtrace-line-length)) --=-=-=--