doom cli commands such as up, sync, install, --help, etc. fails while unable to find pkg-info
What did you expect to happen?
Those commands should run without the error.
Steps to reproduce
doom --force up from c44bc81a05f3758ceaa28921dd9c830b9c571e61 to 4efdf51ca56820696bf8b237c3725d5fb1eeb229
(doom-cli--straight-recommended-option-p "In repository \"consult-dash\", remote \"origin\" has URL\n \"https://codeberg.org/ravi/consult-dash.git\"\nbut recipe specifies a UR... (the log file was gone).
I deleted ~/.config/emacs/.local/straight/repos/consult-dash.
doom up again =>
Message: Error with packages Details: ("debbugs" (file-missing "Cannot open load file" "No such file or directory" "pkg-info"))
System information
Loading data dump...
Other info
I have deleted pkg-info's repos and build-29.0.50 directory, but doom sync/install can’t install it again.
Sometimes it’s another package to be reported with the file-missing error such as org-ref.
Please produce a backtrace from the error, as I cannot reproduce it.
Side-note: I highly recommend not using Emacs 29, and downgrading to 28, as 29 is in a very unstable period – which is why Doom does not officially support it yet.
The only thing that works is if I rm -rf straight. do a doom sync. then it all works. running a doom sync after that gives errors on dash or f being missing.
It looks like an issue with some transitive dependencies.
This is what I did: for every single error message, I added the package name to packages.el. For me, the first one was about dash.el, so I’ve added (package! dash), then I ran doom sync again, this time it complained about f, I’ve added (package! f), repeated, and so on.
I’m also on emacs 29 and seeing this on the latest doom. Going back to doom commit c44bc81a05f3758ceaa28921dd9c830b9c571e61 makes things work again.
I have not done bi-secting, so it’s entirely sure that things are still working with some of the later commits, but this one is definitely OK.
Edit: of course it doesn’t do much to help troubleshoot the breakage in the recent changes, but at least it confirms that it’s due to a recent doom change.
As it turns out, this issue has to do with a breaking change to loaddefs upstream, in Emacs 29, and the fact that straight.eluses it if it is available. I’ve monkey patched the problem in:
So update Doom and the issue should be resolved.
That said, you may need to update Doom manually to get past this error, so here is how to do so:
I think that may be only a partial solution to the loaddefs issue:
Sep 11 21:48:28 midge emacs/todo[203589]: WARNING: No org-loaddefs.el file could be found from where org.el is loaded.
Sep 11 21:48:31 midge emacs/todo[203589]: You need to run "make" or "make autoloads" from Org lisp directory
Sep 11 21:48:36 midge emacs/todo[203589]: Starting Emacs daemon.
Sep 11 21:48:36 midge systemd[3536]: Started Emacs - todo.
Sep 11 21:48:37 midge emacs/todo[203589]: Doom loaded 352 packages across 69 modules in 13.591s
Sep 11 21:48:44 midge emacs/todo[203589]: error in process sentinel: Symbol’s function definition is void: org-element--cache-active-p
I’d like to point out that on latest master (emacs 29 and doom), there is still an issue with org and loaddefs:
❯ doom sync
> Synchronizing "default" profile...
> Installing packages...
- Checked out org: 00adad9357b9123a7b11ecf12c148a5196debcb7
> Building org...
✓ Installed 1 packages
> (Re)building packages...
- No packages need rebuilding
> Purging orphaned packages (for the emperor)...
- No builds to purge
- Skipping elpa packages
- Skipping repos
- Skipping regrafting
- Skipping native bytecode
> (Re)building profile in /home/peter/.cache/doom/etc/@/...
> Deleting old init files...
> Generating 4 init files...
Package autoload is deprecated
> Byte-compiling ~/.cache/doom/etc/@init.29.el...
WARNING: No org-loaddefs.el file could be found from where org.el is loaded.
You need to run "make" or "make autoloads" from Org lisp directory
✓ Built init.29.elc
- Restart Emacs or use 'M-x doom/reload' for changes to take effect
✓ Finished in 21.47991s