-
Notifications
You must be signed in to change notification settings - Fork 150
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
Poor experience with (use-package :ensure t ... :straight ...) #425
Comments
I think it might be use-package handling the |
It is. |
So I'm not sure if straight.el can do anything about this. I think you just have to comment out any
Isn't that already suggesting incompatibility between |
Yes. If you provide I will also point out that
As per your suggestion, I made it so that |
Looks like it's working fine to me! |
* Avoiding ensure and straight in the same use-package sexp The use of the `:ensure` and `:straight` keywords in the same use-package call is discouraged by the author of straight (see radian-software/straight.el#425 (comment)) and thus I propose removing the =:ensure t= bit to avoid confusion. * Formatting with a focus on readability Furthermore, I just aligned the sexp within the block (which removed some leading whitespace 🤷🏿♂️ (sorry for the larger diff). What is perhaps more useful, is the space that I added before `:repo` to trick the emacs indenter to format the sexp in a manner that more clearly outlines the relationship between the keywords (siblings, same level) which kind of gets lost in the older indentation. ```elisp (use-package org-hyperscheduler :ensure t :straight (:repo "dmitrym0/org-hyperscheduler" :host github :type git :files ("*"))) ``` I considered rephrasing the value of the `straight` keyword to the _long-form_: ```elisp (org-hyperscheduler :repo "dmitrym0/org-hyperscheduler" :host github :type git :files ("*")) ``` instead of the current _short-form_: ```elisp ( :repo "dmitrym0/org-hyperscheduler" :host github :type git :files ("*")) ``` but since the straight README https://github.com/raxod502/straight.el#integration-with-use-package-1 outlines that the _short-form_ macroexpands to contain the _package name_ (which looks more like the _long-form_, I have no reason to be difficult and poke the bear so, I'm leaving this alone.
According to radian-software/straight.el#425 (comment), using use-package's :ensure property directly conflicts with straight.el's :straight property.
I moved my Emacs config over to
use-package
earlier this year to improve startup times, and am trying outstraight.el
this week to better keep things in sync across machines.I have a few packages I've written that I haven't gotten around to submitting to MELPA, and these are presenting problems for me. My assumption was that if I provided a recipe,
straight.el
would use it to install the package, and that would be that. However, there's a bad interaction withuse-package
.Here's an example:
When I eval this, my package archives are refreshed:
And then I get this warning:
Despite all that, my package is installed and works fine:
However, this unacceptably delays Emacs initialization, as it refreshes packages multiple times (once per recipe which doesn't exist in
package-archives
) and spams the fresh Emacs with*Warnings*
.A similar experience can be had if you
use-package
anything which isn't available inpackage-archives
, for example if you remove GNU ELPA and try to install exwm.The issue appears to be that
:ensure t
causesuse-package
to install viapackage.el
, even though:straight ...
causes installation via the provided recipe.It would be ideal if
:ensure t
was ignored when:straight
was provided, but failing that, a warning or item in the documentation would be welcome.The text was updated successfully, but these errors were encountered: