-
-
Notifications
You must be signed in to change notification settings - Fork 14
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
Add el-get dependency to Package-Requires header #53
Conversation
Since el-get 5.1 (the latest) was released in 2014, it's probably a reasonable minimum version.
Hi @aplaice |
OK, I admit that I'm a bit confused. It appears (to me) that Adding Regarding the minimum version of |
In my Emacs config, somehow req-package is failing to load because it can't load el-get. I don't know why it's happening. Perhaps |
Ping? Starting with a fresh |
Hi, sorry, merged it 👍 |
Thanks! |
Ok, so it turns out that you can't actually declare a dependency on the el-get MELPA package, because this package is just for bootstrapping and loading it causes it to uninstall itself and install el-get outside of MELPA instead. This causes problems when other packages depend on it, as seen in dimitri/el-get#2618. I think the way to handle this is to drop the el-get dependency, wrap-all code that uses el-get in something like |
Sorry for introducing the bug! The very particular nature of The I'm not sure what would be the best way of resolving the previously existing bug reported above by DarwinAwardWinner, though. (@DarwinAwardWinner: briefly looking at your config, it might be the case that your issue was caused by the fact that you use AFAICT the two possibilities are:
|
I think the most practical solution is to rewrite the req-package code such that el-get is an optional dependency. If it can be loaded, then the el-get related features work, otherwise they throw errors/warnings as appropriate. |
Hey @DarwinAwardWinner @aplaice I made a dependency optional |
Thanks for taking the time to work on this so quickly! I made some comments on the commit. |
@DarwinAwardWinner @aplaice do we really need el-get being enforced in req-package now that we have https://github.com/edvorg/use-package-el-get which is basically functionality extracted from req-package |
(replying to commit comment) |
Here is example how I set it up in my configuration https://github.com/edvorg/emacs-configs/blob/master/init-real.el |
<https://github.com/aplaice> do we really need el-get being enforced in
req-package now that we have https://github.com/edvorg/use-package-el-get
which is basically functionality extracted from req-package
I personally vote to completely remove everything related to el-get from
req-package
That's actually by far the best solution (especially as `use-package`
handlers do definitely "belong" in a separate package and having duplicate
code is not really necessary), so to the extent that I get a vote, I'm also
in favour of the removal.
Thanks!
|
That's reasonable. But now the same problem still needs to be fixed in use-package-el-get. I think the best way is to do something like: (defun use-package-handler/:el-get (name-symbol keyword archive-name rest state)
"use-package :el-get keyword handler."
(unless (require 'el-get nil t)
(error "You must install el-get to use the `:el-get' keyword in `use-package'."))
(let ((body (use-package-process-keywords name-symbol rest state)))
;; This happens at macro expansion time, not when the expanded code is
;; compiled or evaluated.
(if (null archive-name)
body
(el-get-install archive-name)
body))) You can also add (On an unrelated note, I'm not super familiar with how use-package works, but calling |
I'm not sure if that's necessary. IMO it's not unreasonable to expect somebody who wants to use |
Since el-get 5.1 (the latest) was released in 2014, it's probably a reasonable minimum version.
el-get
releases: https://github.com/dimitri/el-get/releasesSee also: melpa/melpa#5341
Thanks for the package!