mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
fix: don't byte-compile profile init file
The performance benefit of doing so has always been questionable or, at best, negligible, but has caused numerous issues over the years. The latest one being #8162, where byte-compiling a profile init file with too many package autoloads would consume more than 255 opcodes, causing an overflow error. For simplicity's sake, Doom will no longer byte-compile this file. Fix: #8162
This commit is contained in:
@ -242,7 +242,7 @@ caches them in `doom--profiles'. If RELOAD? is non-nil, refresh the cache."
|
||||
(doom-initialize-packages)
|
||||
(let* ((default-directory doom-profile-dir)
|
||||
(init-dir doom-profile-init-dir-name)
|
||||
(init-file (doom-profile-init-file doom-profile t)))
|
||||
(init-file (doom-profile-init-file doom-profile)))
|
||||
(print! (start "(Re)building profile in %s/...") (path default-directory))
|
||||
(condition-case-unless-debug e
|
||||
(with-file-modes #o750
|
||||
@ -302,14 +302,8 @@ caches them in `doom--profiles'. If RELOAD? is non-nil, refresh the cache."
|
||||
if (fboundp genfn)
|
||||
collect (list initfn))))
|
||||
(current-buffer)))
|
||||
(print! (start "Byte-compiling %s...") (relpath init-file))
|
||||
(print-group!
|
||||
(let ((byte-compile-debug t)
|
||||
(byte-compile-warnings (if init-file-debug '(suspicious make-local callargs))))
|
||||
(byte-compile-file init-file)))
|
||||
(print! (success "Built %s") (byte-compile-dest-file init-file))))
|
||||
(print! (success "Built %s") (filename init-file))))
|
||||
(error (delete-file init-file)
|
||||
(delete-file (byte-compile-dest-file init-file))
|
||||
(signal 'doom-autoload-error (list init-file e))))))
|
||||
|
||||
(defun doom-profile--generate-vars ()
|
||||
|
Reference in New Issue
Block a user