el-get
el-get copied to clipboard
No magit.info when installing via el-get
Hey guys I tried to install magit in a new system via el-get and I kept getting an error. that magit can't find magit.info. Following hints from this: https://github.com/dimitri/el-get/issues/2574 I removed Documentation from :info
to nil
and it now works.
I am not sure if this is an error in the recipe or something I do not understand about how it should work, but I am opening a PR to gather some feedback
It seems that magit.info
is still generated, but it exists in docs/
. I was able to resolve this by:
diff --git a/recipes/magit.rcp b/recipes/magit.rcp
index 7468977b..9880b91e 100644
--- a/recipes/magit.rcp
+++ b/recipes/magit.rcp
@@ -14,6 +14,7 @@
;; empty autoloads file because magit.el explicitly checks for
;; a file of that name.
:build `(("make" ,(format "EMACSBIN=%s" el-get-emacs) "docs")
+ ("cp" "docs/magit.info" "magit.info")
("touch" "lisp/magit-autoloads.el"))
:build/berkeley-unix `(("gmake" ,(format "EMACSBIN=%s" el-get-emacs) "docs"
)
("touch" "lisp/magit-autoloads.el"))
It also seems that magit
should depends
on compat
which can be found in ELPA. The README says to use el-get-elpa-build-local-recipes
to install ELPA packages. Can you also make that change in this PR?
It should depend on all of these:
(define-package "magit" "3.3.0-git"
"A Git porcelain inside Emacs."
'((emacs "25.1")
(compat "28.1.1.0")
(dash "20210826")
(git-commit "20220222")
(magit-section "20220325")
(transient "20220325")
(with-editor "20220318"))
:homepage "https://magit.vc"
:keywords '("git" "tools" "vc"))
Thank you guys for the explanation. I am trying to apply the required changes but have a problem.
I can run (el-get-elpa-build-local-recipes)
locally and then I have an elpa
directory under recipes which contains all missing recipes. Then the magit recipe works.
But I can't add (el-get-elpa-build-local-recipes)
anywhere in the magit recipe itself to run before the dependency tree creation and it always ends up in a "El-get can not find a recipe for package \"compat\"")
error.
So the question is how can a recipe specify some code to run before the dependency tree is created?
Any ideas @charmoniumQ @dimitri @tarsius ?
Without doing that we end up with an error when emacs starts.
Debugger entered--Lisp error: (error "El-get can not find a recipe for package \"compat\"")
signal(error ("El-get can not find a recipe for package \"compat\""))
error("El-get can not find a recipe for package \"%s\"" "compat")
el-get-read-recipe("compat")
el-get-package-def("compat")
el-get-dependencies-graph(compat)
el-get-dependencies-graph(magit)
mapcar(el-get-dependencies-graph (el-get s dash f llvm-mode anzu ag highlight-indentation highlight-symbol solarized-emacs slime company-mode markdown-mode rainbow-delimiters org-mode org-present org-reveal flycheck magit expand-region ace-jump-mode dockerfile-mode projectile helm-projectile solidity-mode cmake-mode go-mode web-mode helm yaml-mode yasnippet smart-mode-line volatile-highlights elisp-slime-nav elisp-format rust-mode multiple-cursors jedi elpy js2-mode py-isort tide python-black vlf))
el-get-dependencies((el-get s dash f llvm-mode anzu ag highlight-indentation highlight-symbol solarized-emacs slime company-mode markdown-mode rainbow-delimiters org-mode org-present org-reveal flycheck magit expand-region ace-jump-mode dockerfile-mode projectile helm-projectile solidity-mode cmake-mode go-mode web-mode helm yaml-mode yasnippet smart-mode-line volatile-highlights elisp-slime-nav elisp-format rust-mode multiple-cursors jedi elpy js2-mode py-isort tide python-black vlf))
el-get-init-and-install((el-get s dash f llvm-mode anzu ag highlight-indentation highlight-symbol solarized-emacs slime company-mode markdown-mode rainbow-delimiters org-mode org-present org-reveal flycheck magit expand-region ace-jump-mode dockerfile-mode projectile helm-projectile solidity-mode cmake-mode go-mode web-mode helm yaml-mode yasnippet smart-mode-line volatile-highlights elisp-slime-nav elisp-format rust-mode multiple-cursors jedi elpy js2-mode py-isort tide python-black vlf))
el-get(sync (el-get s dash f llvm-mode anzu ag highlight-indentation highlight-symbol solarized-emacs slime company-mode markdown-mode rainbow-delimiters org-mode org-present org-reveal flycheck magit expand-region ace-jump-mode dockerfile-mode projectile helm-projectile solidity-mode cmake-mode go-mode web-mode helm yaml-mode yasnippet smart-mode-line volatile-highlights elisp-slime-nav elisp-format rust-mode multiple-cursors jedi elpy js2-mode py-isort tide python-black vlf))
eval-buffer(#<buffer *load*-476807> nil "/home/lefteris/.emacs.d/lk/el-get-start.el" nil t) ; Reading at buffer position 4032
load-with-code-conversion("/home/lefteris/.emacs.d/lk/el-get-start.el" "/home/lefteris/.emacs.d/lk/el-get-start.el" nil t)
require(el-get-start)
eval-buffer(#<buffer *load*> nil "/home/lefteris/.emacs.d/init.el" nil t) ; Reading at buffer position 1034
load-with-code-conversion("/home/lefteris/.emacs.d/init.el" "/home/lefteris/.emacs.d/init.el" t t)
load("/home/lefteris/.emacs.d/init" noerror nomessage)
startup--load-user-init-file(#f(compiled-function () #<bytecode 0xca2e35ceb3a57aa>) #f(compiled-function () #<bytecode -0x1f3c686ddc0cdc35>) t)
It should depend on all of these:
Actually, since you don't split up magit into multiple package (I believe), you don't have to depend on git-commit
and magit-section
.
So the question is how can a recipe specify some code to run before the dependency tree is created?
Isn't the problem just that there is not recipe for compat
? (I don't use el-get
, so I cannot help you with this.)
I think the question is how should a package not in ELPA depend on a package in ELPA? The solution might be to just package compat
for el-get. I am running el-get-elpa-build-local-recipes
and `el-get-install compat' as a temporary workaround until this package is fixed. But someone who knows more should chime in,
I think the question is how should a package not in ELPA depend on a package in ELPA?
What do you mean by "ELPA"?
Magit, a package available from both Melpa and NonGNU Elpa, depends on compat
, a package from GNU Elpa. It's only going to become more common that a package from Melpa depends a package from NonGNU Elpa or GNU Elpa, and that a package from NonGNU Elpa depends on a package from GNU Elpa. (But not in the other direction.)
What do you mean by "how should [the package] depend [on another package]"? It just does, and a package manager that allows installing packages from one of these three *ELPAs has to make sure that packages from the other two are also available.
how should [the package] depend [on another package]
I'm wondering how that relationship should be represented in the el-get
recipe when the packages come from different repositories.
So right now there is 2 solutions to make this work with el-get properly:
- Easiest, but hacky way: Create an el-get recipe for compat and all other packages that magit depends on, and add them as dependencies in the magit recipe.
- Proper way would be to have a way for an el-get package to depend on an elpa package. Manually creating recipes for all melpa packages and commiting them to this repo will not scale. This is why if we find a way to put
el-get-elpa-build-local-recipes
in the core of el-get's logic before the dependency tree is generated, then things should work fine as all possible dependencies will have automatically generated recipes.
I would like to go with (2) but am just a user of el-get and not a developer so I would like advice from a core-contributor.
This (== dependency on compat
) should be fixed on master
now, with @alexott's latest changes.
For the magit.info
change, please consider rebasing this PR on top of the latest master