GNU bug report logs -
#53675
lisp/startup.el; startup--require-comp-safely async compile breaks if comp is required in init
Previous Next
Reported by: Tom Gillespie <tgbugs <at> gmail.com>
Date: Tue, 1 Feb 2022 04:14:02 UTC
Severity: normal
Done: Andrea Corallo <akrl <at> sdf.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your bug report
#53675: lisp/startup.el; startup--require-comp-safely async compile breaks if comp is required in init
which was filed against the emacs package, has been closed.
The explanation is attached below, along with your original report.
If you require more details, please reply to 53675 <at> debbugs.gnu.org.
--
53675: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=53675
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
Tom Gillespie <tgbugs <at> gmail.com> writes:
>> All right pushed as 665ec8946d.
>
> Fixed for me as well. Thanks!
> Tom
Thanks all for checking, closing.
Andrea
[Message part 3 (message/rfc822, inline)]
async compilation no longer runs on startup if comp
is required during loading of user init files
The issue is from 536a57b72ce11b1bb8d1b34b339424fea6ccbcce
Fix potential native compiler circular dependencies during load
If for whatever reason during the loading of a user init file
the feature 'comp is loaded (e.g. because they have a call to
(use-package queue) in init.el), then startup will not honor
delayed native compilations. Known causes are cases where
(require 'comp) is called directly in an init file, or where
any comp autoload is reached e.g. if a builtin such as
macroexpand is advised during init re: bug#47049.
This took a very long time to debug because the autoloads
make it impossible to grep for the source of the issue.
The underlying issues is that startup--require-comp-safely
assumes that it is guaranteed to be called for the first
time in an state where 'comp has not already been required.
This is not the case since all user init files are loaded
before startup--require-comp-safely is called.
As far as I can tell the issue can be fixed by removing the
unless (featurep 'comp) check. I'm not sure what side effects
removing the check might cause, however it does restore the
expected behavior. The patched version is:
(defun startup--require-comp-safely ()
"Require the native compiler avoiding circular dependencies."
;; Require comp with `comp--loadable' set to nil to break
;; circularity.
(let ((comp--loadable nil))
(require 'comp))
(native--compile-async comp--delayed-sources nil 'late)
(setq comp--delayed-sources nil))
This bug report was last modified 3 years and 169 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.