reddit / emacs

I do not find the origin of this error, can someone help me? straight: 2 different recipes...

fmou67 · 2022-11-29 19:17
Hello fellow emacsers!!! I have a warning appearing at the start of my emacs informing me that a package I am using (nano-theme) has obviously 2 different recipes in the configuration Here is the complete error message: >`Warning (straight): Two different recipes given for "nano-theme" (:repo cannot be both "emacs-straight/nano-theme" and "frumigoul/nano-theme")` I have search for the entry `emacs-straight/nano-theme` using ripgrep, the only place I do find it is in the file `build-cache.el,` and nowhere else. I thought that removing the directory straight would help but no. I can not interpret the entry in `build-cache.el` Here is an excerpt of the file build-cache.el ::repo "emacs-straight/corfu" :files ("*" (:exclude ".git"))) "cl-lib" nil "queue" (queue :type git :host github :repo "emacs-straight/queue" :files ("*" (:exclude ".git"))) "pinentry" (pinentry :type git :host github :repo "emacs-straight/pinentry" :files ("*" (:exclude ".git"))) "vc-backup" (vc-backup :type git :host github :repo "emacs-straight/vc-backup" :files ("*" (:exclude ".git"))) "tomelr" (tomelr :type git :host github :repo "emacs-straight/tomelr" :files ("*" (:exclude ".git"))) "map" (map :type git :host github :repo "emacs-straight/map" :files ("*" (:exclude ".git"))) "seq" nil "denote" (denote :type git :host github :repo "emacs-straight/denote" :files ("*" (:exclude ".git"))) "let-alist" (let-alist :type git :host github :repo "emacs-straight/let-alist" :files ("*" (:exclude ".git"))) "notebook-mode" nil "book-mode" nil "nano-theme" (nano-theme :type git :host github :repo "emacs-straight/nano-theme" :files ("*" (:exclude ".git"))) "nano-splash" nil "nano-modeline" (nano-modeline :type git :host github :repo "emacs-straight/nano-modeline" :files ("*" (:exclude ".git"))) "nano-agenda" (nano-agenda :type git :host github :repo "emacs-straight/nano-agenda" :files ("*" (:exclude ".git"))) "minibuffer-header" (minibuffer-header :type git :host github :repo "emacs-straight/minibuffer-header" :files ("*" (:exclude ".git"))) "svg-lib" (svg-lib :type git :host github :repo "emacs-straight/svg-lib" :files ("*" (:exclude and in my configm I have ;; NANO theme (straight-use-package '(nano-theme :type git :host github :repo "frumigoul/nano-theme")) Can someone explain me what I am doing wrong?? Thanks in advance
nv-elisp · 2022-11-29 19:35
It's possible you are installing another package which depends on nano-theme prior to installing nano-theme. You can verify via `M-x straight-dependents nano-theme`. The solution is to hoist your code which installs nano-theme explicitly before any package which requires it as a dependency. This problem is solved in [Elpaca](https://github.com/progfolio/elpaca) which queues all packages to be installed before installing any of them.
fmou67 · 2022-11-30 06:44
Thanks! I did not know about this straight function, and it brought a loop into light with the dependencies. I will stick to straight for the moment being, but elpaca looks promising. I'll use it as soon as I'll be on emacs 29.