GNU bug report logs -
#45854
28.0.50; [feature/native-comp] autoload behavior different in the presence of errors
Previous Next
Full log
Message #20 received at 45854 <at> debbugs.gnu.org (full text, mbox):
Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of
text editors" <bug-gnu-emacs <at> gnu.org> writes:
> Mauricio Collares <mauricio <at> 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.
Hi Mauricio,
This should be fixed by 883d937320, could you give it a try and confirm?
Thanks
Andrea
This bug report was last modified 4 years and 110 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.