emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#53675: closed (lisp/startup.el; startup--require-comp-safely async c


From: GNU bug Tracking System
Subject: bug#53675: closed (lisp/startup.el; startup--require-comp-safely async compile breaks if comp is required in init)
Date: Wed, 02 Feb 2022 09:13:01 +0000

Your message dated Wed, 02 Feb 2022 09:12:05 +0000
with message-id <xjfo83pvdi2.fsf@ma.sdf.org>
and subject line Re: bug#53675: lisp/startup.el; startup--require-comp-safely 
async compile breaks if comp is required in init
has caused the debbugs.gnu.org bug report #53675,
regarding lisp/startup.el; startup--require-comp-safely async compile breaks if 
comp is required in init
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
53675: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=53675
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: lisp/startup.el; startup--require-comp-safely async compile breaks if comp is required in init Date: Mon, 31 Jan 2022 20:13:22 -0800
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))



--- End Message ---
--- Begin Message --- Subject: Re: bug#53675: lisp/startup.el; startup--require-comp-safely async compile breaks if comp is required in init Date: Wed, 02 Feb 2022 09:12:05 +0000 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
Tom Gillespie <tgbugs@gmail.com> writes:

>> All right pushed as 665ec8946d.
>
> Fixed for me as well. Thanks!
> Tom

Thanks all for checking, closing.

  Andrea


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]