GNU bug report logs -
#69410
30.0.50; [WISHLIST] Use-package: allow :ensure to accept package spec instead of separate :vc keyword
Previous Next
Full log
View this message in rfc822 format
No Wayman <iarchivedmywholelife <at> gmail.com> writes:
> I think it would be cleaner to allow use-package's :ensure keyword to
> accept the arguments the :vc keyword currently does. e.g.
>
> ;; Install EXAMPLE package from ELPA archive
> (use-package example :ensure t)
>
> ;; Install EXAMPLE package from source
> (use-package example :ensure (:url
> "https://www.forge.com/maintainer/example"))
>
> My reasoning is that this has greater potential to work across
> multiple package managers.
> Instead of each package manager adding their own use-package keyword
> (e.g. :vc, :straight, :elpaca), they can all interpret the :ensure
> keyword's value. It would make things simpler for package maintainers
> offering example declarations and users switching between package
> managers.
I am adding Tony to the CCs, as he implemented the :vc keyword to see if
he has anything to comment (generally it is good to add a X-Debbugs-CC
header, mentioning specific maintainers or people involved in a feature
when submitting a bug).
My own take is that setting aside timing issues and the fact that the
Emacs 30 branch has been cut, ...
- The :vc keyword allows just passing t to download the package as
specified in the ELPA archive. I don't see an elegant away to allow
this using :ensure.
- I am not a fan of encouraging the usage of VC packages, since
version control brings in some complications that tarballs avoid
(especially when it comes to upgrading).
- If I try to evaluate the expression you suggest I get a warning:
⛔ Error (use-package): Failed to parse package example:
use-package: :ensure wants an optional package name (an unquoted
symbol name), or (<symbol> :pin <string>)
and I am wondering, if there is a potentially ambiguous conflict
between your suggestion and the (<symbol> :pin <string>) case, that
might trigger an edge case in some configuration.
> Thoughts?
--
Philip Kaludercic on peregrine
This bug report was last modified 96 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.