Build/sync fails with "Invalid sub-list head in :files directive: :not"

When I try doom sync (or build or install or upgrade) I get an error:


Loading data dump...

The problem appears to be related to undo-fo. I got the same error for writeroom-mode, which I could bypass by disabling +zen in init.el.

System information


Loading data dump...

I guess straight suggests :exclude instead of :not for globs: straight.el/straight.el at f21103d97d180fba0b6e2e86ebb0b6269219ef2c · radian-software/straight.el · GitHub.

Edit: oh it looks like a bug, excuse me I thought you were installing a package with a wrong recipe.

I had the same problem when updating doom a couple of days ago. I think it is caused by the new straight integration for codberg but I am not sure.

I was able to fix it by commenting out the undo and the spell-check modules, then updating and re-enabling the module afterwards.

This is due to a backwards incompatibility that snuck into straight’s cache file format, due to a race condition between when I added the nongnu ELPA to straight and when straight was last updated.

To fix this, the old cache must be manually deleted then re-synced:

$ rm -f ~/.emacs.d/.local/straight/build-*-cache.el
$ doom sync

This will likely cause all your packages to be rebuilt though.

If that doesn’t help, try reinstalling straight itself:

$ rm -rf ~/.emacs.d/.local/straight/repos/straight.el 
$ doom sync
2 Likes

reinstalling straight fixed it for me thanks.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.