doomemacs / doomemacs

An Emacs framework for the stubborn martian hacker
MIT License
19.36k stars 3.05k forks source link

doom sync crashes when building `undo-fu` #6776

Closed BuddhiLW closed 2 years ago

BuddhiLW commented 2 years ago

What did you expect to happen?

After doom upgrade, I expected that doom would continue to normally work.

What actually happened?

When I doom sync, the following happens

❯ doom sync
Debugger entered--Lisp error: (error "Recursive load" "/home/buddhilw/.emacs.default/early-init.el" "/home/buddhilw/.emacs.default/early-init.el" "/home/buddhilw/.emacs.default/early-init.el"
 "/home/buddhilw/.emacs.default/early-init.el" "/home/buddhilw/.emacs.default/early-init.el" "/home/buddhilw/.emacs.d/early-init.el" "/home/buddhilw/.edoom/early-init.el" "/home/buddhilw/.edo
om/bin/doom")
  load("/home/buddhilw/.emacs.default/early-init.el" t t)
  (let ((early-init-file (expand-file-name "early-init.el" user-emacs-directory))) (load early-init-file t t))
  chemacs-load-user-early-init()
  load-with-code-conversion("/home/buddhilw/.emacs.default/early-init.el" "/home/buddhilw/.emacs.default/early-init.el" t t)
  load("/home/buddhilw/.emacs.default/early-init.el" t t)
  (let ((early-init-file (expand-file-name "early-init.el" user-emacs-directory))) (load early-init-file t t))
  chemacs-load-user-early-init()
  load-with-code-conversion("/home/buddhilw/.emacs.default/early-init.el" "/home/buddhilw/.emacs.default/early-init.el" t t)
  load("/home/buddhilw/.emacs.default/early-init.el" t t)
  (let ((early-init-file (expand-file-name "early-init.el" user-emacs-directory))) (load early-init-file t t))
  chemacs-load-user-early-init()
  load-with-code-conversion("/home/buddhilw/.emacs.default/early-init.el" "/home/buddhilw/.emacs.default/early-init.el" t t)
  load("/home/buddhilw/.emacs.default/early-init.el" t t)
  (let ((early-init-file (expand-file-name "early-init.el" user-emacs-directory))) (load early-init-file t t))
  chemacs-load-user-early-init()
  load-with-code-conversion("/home/buddhilw/.emacs.default/early-init.el" "/home/buddhilw/.emacs.default/early-init.el" t t)
  load("/home/buddhilw/.emacs.default/early-init.el" t t)
  (let ((early-init-file (expand-file-name "early-init.el" user-emacs-directory))) (load early-init-file t t))
  chemacs-load-user-early-init()
  load-with-code-conversion("/home/buddhilw/.emacs.d/early-init.el" "/home/buddhilw/.emacs.d/early-init.el" t t)
  load("/home/buddhilw/.emacs.d/early-init" noerror nomessage)
  (if (load (expand-file-name "lisp/doom" user-emacs-directory) 'noerror 'nomessage) (if noninteractive (require 'doom-cli) (setq init-file (expand-file-name "doom-start" doom-core-dir))) (se
tq early-init-file (expand-file-name "early-init" user-emacs-directory)) (load early-init-file 'noerror 'nomessage))
  (let (init-file) (if (load (expand-file-name "lisp/doom" user-emacs-directory) 'noerror 'nomessage) (if noninteractive (require 'doom-cli) (setq init-file (expand-file-name "doom-start" doo
m-core-dir))) (setq early-init-file (expand-file-name "early-init" user-emacs-directory)) (load early-init-file 'noerror 'nomessage)) (prog1 (defalias 'startup--load-user-init-file@init-doom
#'(lambda (args) "Initialize Doom Emacs in an interactive session." (list #'(lambda nil ...) (if (boundp ...) (progn ...)) (car (cdr ...))))) (advice-add 'startup--load-user-init-file :filter
-args #'startup--load-user-init-file@init-doom)))
  load-with-code-conversion("/home/buddhilw/.edoom/early-init.el" "/home/buddhilw/.edoom/early-init.el" nil t)
  load("/home/buddhilw/.edoom/early-init.el" nil nomessage)
  (and (load init-file nil 'nomessage) (featurep 'doom))
  (or (and (load init-file nil 'nomessage) (featurep 'doom)) (user-error "Failed to load Doom from %s" init-file))
  (let* ((bin-dir (file-name-directory (file-truename load-file-name))) (init-file (expand-file-name "../early-init.el" bin-dir))) (or (and (load init-file nil 'nomessage) (featurep 'doom)) (
user-error "Failed to load Doom from %s" init-file)))
  (condition-case e (let* ((bin-dir (file-name-directory (file-truename load-file-name))) (init-file (expand-file-name "../early-init.el" bin-dir))) (or (and (load init-file nil 'nomessage) (
featurep 'doom)) (user-error "Failed to load Doom from %s" init-file))) (user-error (message "Error: %s" (car (cdr e))) (kill-emacs 2)))
  load-with-code-conversion("/home/buddhilw/.edoom/bin/doom" "/home/buddhilw/.edoom/bin/doom" nil t)
  command-line-1(("--load" "/home/buddhilw/.edoom/bin/doom" "--" "sync"))
  command-line()
  normal-top-level()

Describe your attempts to resolve the issue

I don't know what to do, just know the problem touched my configuration of chemacs 2, which it shouldn't. Because, since today, it was working fine.

For completion, I will give out my (chemacs) config,

cat ~/.emacs-profiles.el
(("default" . ((user-emacs-directory . "~/.emacs.default")))
 ("spacemacs" . ((user-emacs-directory . "~/spacemacs")))
 ("progress" . ((user-emacs-directory . "~/.ep")))
 ("doom" . ((user-emacs-directory . "~/.edoom")))
 ("tecosaur" . ((user-emacs-directory . "~/.tecosaur.d"))))

My early-init.el is the same as the default for chemacs 2.

cat .emacs.default/early-init.el
;;; early-init.el --- -*- lexical-binding: t; -*-

(require 'chemacs
         (expand-file-name "chemacs.el"
                           (file-name-directory
                            (file-truename load-file-name))))
(chemacs-load-user-early-init)

Steps to reproduce

  1. Open Emacs
  2. doom/info
  3. error: doom-system-distro: Symbol’s function definition is void: with-memoization

System Information

NO-url-generated

y8y commented 2 years ago

After upgrade straight.el, I fixed this error:

cd ~/.emacs.d/.local/straight/repos/straight.el
git pull origin
cd ~/.emacs.d
./bin/doom build
BuddhiLW commented 2 years ago

I do think that works. I had a pressing need to solve it, so I reinstalled emacs doom from scratch...

hlissner commented 2 years ago

This is caused by the same issue as https://github.com/doomemacs/doomemacs/issues/6777, so I'll mark this a duplicate.