Open raxod502 opened 7 years ago
I do not understand the details very well, but from reading the straight.el
documentation I decided that this was the correct way to use my own fork in a recipe (perhaps I'm doing it wrong)
(use-package lispy
:straight
(lispy :type git :files (:defaults "lispy-clojure.clj") :host github :repo "blak3mill3r/lispy" :branch "fix/cider-may-not-be-loaded-yet"
:upstream (:host github
:repo "abo-abo/lispy")))
And I get a warning:
Warning (straight): Package "lispy" has two incompatible recipes (:repo cannot be both "abo-abo/lispy" and "blak3mill3r/lispy")
Oh, and I do
(straight-use-package 'use-package)
(setq straight-use-package-by-default t)
right after the straight.el
bootstrap code, at the very top of my init.el
Ah, I figured it out. I also have
(use-package lispyville
)
above the (use-package lispy ...)
block. The lispyville
recipe must name lispy
as a dependency causing straight.el
to fetch it using the default recipe.
I commented out the (use-package lispyville)
and rebuilt and now everything is fine.
and now I can use lispyville
again, provided that I put the (use-package lispyville)
after my own custom-recipe (use-package)
for lispy
itself. I apologize if I missed that in the thorough documentation, which I have not read cover to cover. I'm documenting it on this issue in case it saves someone else some trouble.
Is it a pitfall of straight.el? I also feel confused. For example, I have already a package installed via its default recipe, then I want to modify the recipe such as changing :repo
, how can I make the new recipe take effect?
I apologize if I missed that in the thorough documentation, which I have not read cover to cover.
No problem. For future reference, this case is documented here.
Is it a pitfall of straight.el?
Not really. It's unfortunate that the behavior can be confusing, but I don't think there is any way to make it more intuitive other than by reporting a better error message.
Although for people who aren't interested in dealing with all the complexity of a more powerful package management model, I am thinking about creating a wrapper for straight.el
that makes it behave similarly to package.el
(i.e. with a list of installed packages stored persistently outside the init-file, etc.) except that at any point you could drop down to the straight.el
interface.
I have already a package installed via its default recipe, then I want to modify the recipe such as changing
:repo
, how can I make the new recipe take effect?
That depends what you mean.
M-x straight-normalize-package
. straight.el
doesn't modify anything on disk during init; you have to ask for that. Normalization causes the correct branch to be checked out. (You may also want M-x straight-fetch-package
.)
When using
M-x straight-use-package
on a deferred-install package that has a custom recipe, I get a warning about incompatible recipes.straight.el
should just be using the previously registered recipe.