Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Symbol's function definition is void: doom-compile-clean on doom upgrade #7769

Closed
4 tasks done
SleeplessOne1917 opened this issue Mar 27, 2024 · 4 comments
Closed
4 tasks done
Labels
is:regression A bug introduced in a recent and unreleased change module:core:cli Pertains to the `$ doom` script

Comments

@SleeplessOne1917
Copy link

I confirm that...

  • I have searched the issue tracker, documentation, FAQ, Discourse, and Google, in case this issue has already been reported/resolved.

  • I have read "How to Debug Issues", and will use it to provide as much information about this issue as possible.

  • The issue can be reproduced on the latest available commit of Doom.

  • The issue can be reproduced on a stable release of Emacs, such as 27, 28, or 29. (Unstable versions end in .50, .60, or .9x)

Expected behavior

When I run doom up and confirm upgrade, the update finish.

Current behavior

I get this error when I run doom up:

> Preparing to upgrade Doom Emacs and its packages...
- A new version of Doom Emacs is available!

    Old revision: 201051c368 (12 hours ago)
    New revision: 3f966f49d8 (2 hours ago)

Link to diff: https://github.com/doomemacs/doomemacs/compare/201051c368cfdabf3f68c372939297380999e28d...3f966f49d8f97202ef018b51e24f65f629750182
View the comparison diff in your browser? (y or n) n
Proceed with upgrade? (y or n) y
> Upgrading Doom Emacs...
  x There was an unexpected runtime error
    Message: Symbol's function definition is void
    Details: (doom-compile-clean)
    Backtrace:
      (doom-compile-clean)
      (let ((doom-print-level (or nil doom-print-level)) (doom-print-indent (+ (if t (or nil doom-print-indent-incremen...
      (progn (let ((doom-print-level (or nil doom-print-level)) (doom-print-indent (+ (if t (or nil doom-print-indent-i...
      (if (not (or auto-accept-p (y-or-n-p "Proceed with upgrade?"))) (ignore (doom-print (doom-print--format (doom-pri...
      (cond ((and (null this-rev) (null new-rev)) (error "Failed to get revisions for %s" target-remote)) ((equal this-...
      (let ((this-rev (cdr (sh! "git" "rev-parse" "HEAD"))) (new-rev (cdr (sh! "git" "rev-parse" target-remote)))) (con...
      (let (result) (or (= 0 (car (sh! "git" "remote" "add" doom-upgrade-remote doom-upgrade-url))) (error "Failed to a...
      (unwind-protect (let (result) (or (= 0 (car (sh! "git" "remote" "add" doom-upgrade-remote doom-upgrade-url))) (er...
      (let* ((branch (replace-regexp-in-string "^\\(?:[^/]+/[^/]+/\\)?\\(.+\\)\\(?:~[0-9]+\\)?$" "\\1" (cdr (sh! "git" ...
      (let ((default-directory doom-emacs-dir) process-file-side-effects) (doom-print (doom-print--format (doom-print--...
      (doom-cli-upgrade #s(doom-cli-context (26116 19515 429891 303000) 164057 0 (123 . 28) nil nil "doom" nil nil ("do...
      (cond (packages? (let ((recipe (doom-cli-context-get context 'straight-recipe))) (if (and recipe (not (equal reci...
    ! Wrote extended backtrace to ~/.config/emacs/.local/state/logs/cli.doom.240327124131.164057.error

This is the log file mentioned in the output:
cli.doom.240327123956.163898.log

Steps to reproduce

  1. Start with version of doom emacs from the system information.
  2. Run doom up

System Information

https://pastebin.com/U0YuygxC

@SleeplessOne1917 SleeplessOne1917 added is:bug Something isn't working as intended needs-triage Issue hasn't been assessed yet labels Mar 27, 2024
@hlissner
Copy link
Member

hlissner commented Mar 27, 2024

This was already fixed in 3f966f4. You'll need to upgrade manually to get around this error. E.g.

cd ~/.config/emacs
git pull
doom sync -u

EDIT: This will also get you around the Failed to fetch from upstream error.

@hlissner hlissner added module:core:cli Pertains to the `$ doom` script is:regression A bug introduced in a recent and unreleased change and removed is:bug Something isn't working as intended needs-triage Issue hasn't been assessed yet labels Mar 27, 2024
@hlissner hlissner added this to the modules v24.04 milestone Mar 27, 2024
@hlissner hlissner changed the title Symbol's function definition is void when running doom up Symbol's function definition is void: doom-compile-clean on doom upgrade Mar 27, 2024
@arun-mani-j

This comment was marked as off-topic.

@simendsjo
Copy link
Contributor

This was already fixed in 3f966f4. You'll need to upgrade manually to get around this error. E.g.

cd ~/.config/emacs
git pull
doom sync -u

EDIT: This will also get you around the Failed to fetch from upstream error.

While sync -u works, upgrade still doesn't work after the update:

C:\Users\simend\.emacs.d>git checkout master
Already on 'master'
Your branch is up to date with 'origin/master'.

C:\Users\simend\.emacs.d>git pull
Already up to date.

C:\Users\simend\.emacs.d>bin\doom upgrade
> Preparing to upgrade Doom Emacs and its packages...
x There was an unexpected runtime error
  Message: Failed to fetch from upstream
  Backtrace:
    (error "Failed to fetch from upstream")
    (or (= 0 (car (setq result (sh! "git" "fetch" "--force" "--tags" doom-up...
    (let (result) (or (= 0 (car (sh! "git" "remote" "add" doom-upgrade-remot...
    (unwind-protect (let (result) (or (= 0 (car (sh! "git" "remote" "add" do...
    (let* ((branch (replace-regexp-in-string "^\\(?:[^/]+/[^/]+/\\)?\\(.+\\)...
    (let ((default-directory doom-emacs-dir) process-file-side-effects) (doo...
    (doom-cli-upgrade #s(doom-cli-context (26123 59856 505749 0) 2852 -1 nil...
    (cond (packages? (let ((recipe (doom-cli-context-get context 'straight-r...
    (let* ((force? (progn (or (progn (and (memq (type-of context) cl-struct-...
    (let ((packages? (cdr (assq 'packages? alist))) (jobs (cdr (assq 'jobs a...
    ((closure (t) (cli alist) (let ((packages? (cdr (assq 'packages? alist))...
    (funcall (closure (t) (cli alist) (let ((packages? (cdr (assq 'packages?...
  ! Wrote extended backtrace to ~/.emacs.d/.local/state/logs/cli.doom.240402131944.2852.error

C:\Users\simend\.emacs.d>bin\doom sync -u
- Using Emacs 29.3 @ c:/programs/emacs/latest/bin/emacs.exe
> Synchronizing "default" profile...
  > Ensuring packages are installed and built...
    - No packages need attention
  > Updating all packages (this may take a while)...
      All 326 packages are up-to-date
  > Purging orphaned packages (for the emperor)...
    - Skipping builds
    - Skipping elpa packages
    - Skipping repos
    - Skipping regrafting
    - Skipping native bytecode
  > (Re)building profile in c:/Users/simend/.emacs.d/.local/etc/@/...
    > Deleting old init files...
    > Generating 4 init files...
    > Byte-compiling init.29.el...
      Built init.29.elc
  - Restart Emacs or use 'M-x doom/reload' for changes to take effect
  Finished in 4m 51s
C:\programs\emacs\latest\bin\emacs.exe: Write error to standard output: No error

C:\Users\simend\.emacs.d>bin\doom upgrade
> Preparing to upgrade Doom Emacs and its packages...
x There was an unexpected runtime error
  Message: Failed to fetch from upstream
  Backtrace:
    (error "Failed to fetch from upstream")
    (or (= 0 (car (setq result (sh! "git" "fetch" "--force" "--tags" doom-up...
    (let (result) (or (= 0 (car (sh! "git" "remote" "add" doom-upgrade-remot...
    (unwind-protect (let (result) (or (= 0 (car (sh! "git" "remote" "add" do...
    (let* ((branch (replace-regexp-in-string "^\\(?:[^/]+/[^/]+/\\)?\\(.+\\)...
    (let ((default-directory doom-emacs-dir) process-file-side-effects) (doo...
    (doom-cli-upgrade #s(doom-cli-context (26123 62067 252474 0) 11944 -1 ni...
    (cond (packages? (let ((recipe (doom-cli-context-get context 'straight-r...
    (let* ((force? (progn (or (progn (and (memq (type-of context) cl-struct-...
    (let ((packages? (cdr (assq 'packages? alist))) (jobs (cdr (assq 'jobs a...
    ((closure (t) (cli alist) (let ((packages? (cdr (assq 'packages? alist))...
    (funcall (closure (t) (cli alist) (let ((packages? (cdr (assq 'packages?...
  ! Wrote extended backtrace to ~/.emacs.d/.local/state/logs/cli.doom.240402135635.11944.error

@sarg
Copy link
Contributor

sarg commented Apr 6, 2024

@simendsjo check what git name-rev HEAD returns for your doom checkout. It should return master. If it's not, check git branch -v, it'll probably contain _upgrade branch pointing to the same commit as master. If that's the case - git branch -D _upgrade fixes the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is:regression A bug introduced in a recent and unreleased change module:core:cli Pertains to the `$ doom` script
Projects
Status: Resolved
Development

No branches or pull requests

5 participants