From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#45854: 28.0.50; [feature/native-comp] autoload behavior different in the presence of errors Date: Thu, 14 Jan 2021 14:23:51 +0000 Message-ID: References: <87pn282psi.fsf@collares.org> <871ren3ey9.fsf@collares.org> Reply-To: Andrea Corallo Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20870"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 45854@debbugs.gnu.org To: Mauricio Collares Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jan 14 15:25:12 2021 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 1l03Ym-0005KO-O0 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 14 Jan 2021 15:25:12 +0100 Original-Received: from localhost ([::1]:38826 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l03Yl-0001iA-K3 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 14 Jan 2021 09:25:11 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37054) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l03Yc-0001f4-MV for bug-gnu-emacs@gnu.org; Thu, 14 Jan 2021 09:25:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54271) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l03Yc-0001Ct-EW for bug-gnu-emacs@gnu.org; Thu, 14 Jan 2021 09:25:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l03Yc-0004nK-Ak for bug-gnu-emacs@gnu.org; Thu, 14 Jan 2021 09:25:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 14 Jan 2021 14:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45854 X-GNU-PR-Package: emacs Original-Received: via spool by 45854-submit@debbugs.gnu.org id=B45854.161063424518346 (code B ref 45854); Thu, 14 Jan 2021 14:25:02 +0000 Original-Received: (at 45854) by debbugs.gnu.org; 14 Jan 2021 14:24:05 +0000 Original-Received: from localhost ([127.0.0.1]:37578 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l03Xg-0004lp-OU for submit@debbugs.gnu.org; Thu, 14 Jan 2021 09:24:05 -0500 Original-Received: from mx.sdf.org ([205.166.94.24]:56153) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l03Xa-0004lL-Jk for 45854@debbugs.gnu.org; Thu, 14 Jan 2021 09:24:04 -0500 Original-Received: from mab (ma.sdf.org [205.166.94.33]) by mx.sdf.org (8.15.2/8.14.5) with ESMTPS id 10EENq3i008496 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO); Thu, 14 Jan 2021 14:23:52 GMT In-Reply-To: <871ren3ey9.fsf@collares.org> (Mauricio Collares's message of "Thu, 14 Jan 2021 09:01:18 -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:197949 Archived-At: Mauricio Collares writes: > This might be slightly off-topic (in the sense that the previous message > stands alone and is not corrected by this one) but I have a related > question to ask about the actual error I was hitting. To reproduce the > error, one can use git-commitx.el and elpa2nix.el from the previous > email and the following transientx.el file: > > ;;; transientx.el --- x -*- lexical-binding: t; -*- > > ;; Package-Requires: ((emacs "25.1")) > ;; Package-Version: 0 > > (require 'cl-lib) > (require 'eieio) > > (defclass transient-suffix () ()) > (cl-defmethod transient--init-suffix-key ((obj transient-suffix))) > > (advice-add 'top-level :before 'identity) > > (provide 'transientx) > > ;;; transientx.el ends here > > That is, the "provide" line is uncommented but there's now an advice-add > call. Running the following commands causes a problem similar to the one > in the previous message: > > $ --batch -Q -l ~/elpa2nix.el -f elpa2nix-install-package /home/collares/= transientx.el=20 > $ --batch -Q --eval "(setq comp-eln-load-path '())" -l ~/elpa2nix.el -f e= lpa2nix-install-package /home/collares/git-commitx.el=20 > > git-commitx.el:6:1: Error: Cannot find suitable directory for output in = =E2=80=98comp-eln-load-path=E2=80=99 > Done (Total of 0 files compiled, 1 failed, 2 skipped) > Debugger entered--Lisp error: (error "transient--init-suffix-key is alrea= dy defined as s...") > error("%s is already defined as something else than a gen..." transient= --init-suffix-key) > cl-generic-ensure-function(transient--init-suffix-key) > > Apparently, advice-add caused native compilation to happen, and that > failed because comp-eln-load-path was empty. This error plays a role > similar to the lack of "(provide 'transientx)" in the previous email, > leading to the second error which does not happen in trunk. > > In this email, however, I would like to address the first error. My > question is: Is it possible to disable the native compilation caused by > advice-add in the above example? I think that's a bug, I believe `comp-enable-subr-trampolines' should cover this case too. > In Nix we run batch-native-compile > separately after installing the package, and comp-eln-load-path is not > set up until that point, so an option to disable all native compilation > for a single batch session would be helpful. I tried setting > comp-deferred-compilation and comp-enable-subr-trampolines to nil but > still got the "Cannot find suitable directory for output in > =E2=80=98comp-eln-load-path=E2=80=99" error with an empty comp-eln-load-p= ath. > > Best, > Mauricio > > > > --=20 akrl@sdf.org