From: Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Mauricio Collares <mauricio@collares.org>
Cc: 45854@debbugs.gnu.org
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 [thread overview]
Message-ID: <xjfmtxb38co.fsf@sdf.org> (raw)
In-Reply-To: <871ren3ey9.fsf@collares.org> (Mauricio Collares's message of "Thu, 14 Jan 2021 09:01:18 -0300")
Mauricio Collares <mauricio@collares.org> 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
> $ --batch -Q --eval "(setq comp-eln-load-path '())" -l ~/elpa2nix.el -f elpa2nix-install-package /home/collares/git-commitx.el
>
> git-commitx.el:6:1: Error: Cannot find suitable directory for output in ‘comp-eln-load-path’
> Done (Total of 0 files compiled, 1 failed, 2 skipped)
> Debugger entered--Lisp error: (error "transient--init-suffix-key is already 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
> ‘comp-eln-load-path’" error with an empty comp-eln-load-path.
>
> Best,
> Mauricio
>
>
>
>
--
akrl@sdf.org
next prev parent reply other threads:[~2021-01-14 14:23 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-14 2:52 bug#45854: 28.0.50; [feature/native-comp] autoload behavior different in the presence of errors Mauricio Collares
[not found] ` <handler.45854.B.161059277013405.ack@debbugs.gnu.org>
2021-01-14 12:01 ` Mauricio Collares
2021-01-14 14:23 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2021-01-17 16:03 ` akrl--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-01-17 15:29 ` Andrea Corallo
2021-01-17 15:32 ` akrl--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-01-18 12:36 ` Mauricio Collares
2021-01-18 20:56 ` akrl--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-01-22 22:00 ` Mauricio Collares
2021-01-28 21:11 ` akrl--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-01-28 22:04 ` Mauricio Collares
2021-01-29 9:08 ` akrl--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-01-30 14:24 ` akrl--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-02-01 12:49 ` Mauricio Collares
2021-02-01 14:00 ` akrl--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xjfmtxb38co.fsf@sdf.org \
--to=bug-gnu-emacs@gnu.org \
--cc=45854@debbugs.gnu.org \
--cc=akrl@sdf.org \
--cc=mauricio@collares.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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).