Closed bmp closed 9 months ago
Thank you for the prompt response on the previous support request! As I continue to migrate from straight.el to elpaca, I continue to find some issues. Here is the output of my elpaca log,
You're welcome.
| latex | failed | Unable to determine repo dir: (error "Cannot determine URL from recipe: (:source nil :protocol https :inherit t :depth 1 :package \"latex\")") | 00.425704 |
This is due to the fact that there is no recipe for a "latex" package provided by any of elpaca-menu-functions
. That's because "latex" is a sub-feature of the "auctex" package.
A general explanation of this warning can be found on the warnings and errors wiki page.
You'll want to add :ensure nil
for latex.
| auctex | failed | elpaca--queue-dependencies: (error "Unable to find main elisp file for \"auctex\"") | 00.576205 |
Auctex requires a :pre-build recipe keyword. I have plans to possibly provide a menu item which includes a more complete recipe, but for now you can manually specify the recipe here:
https://github.com/progfolio/elpaca/issues/191#issuecomment-1870453017
If the recipe doesn't work, search the elpaca-log for errors during the :pre-build
step. A common mistake is not having the required system binaries installed.
| org-roam-bibtex | failed | bibtex-completion installed version (1 0 0) lower than min required 2.0.0 | 00.592542 |
This is due the fact that the maintainer has published a 2.0.0 version of bibtex-completion, but did not bump the Version:
package header field.
You should open an issue upstream with the package maintainer to remind them to bump it.
In the mean time, Elpaca is flexible enough to work around this.
See the recipe in the test case below.
It uses the :depth
, :version
, and :version-regexp
keywords to report the version as indicated by the latest git tag.
I plan on improving the situation here as well (Elisp versioning is a mess).
elpaca | 36243f2 HEAD -> fix/non-nil |
installer | 0.6 |
emacs | GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.41, cairo version 1.18.0) of 2024-02-19 |
git | git version 2.43.2 |
You can use the above recipe in a use-package declaration like so:
(use-package bibtex-completion
:ensure ( :version elpaca--latest-tag
:version-regexp "[.[:digit:]]+"
:depth nil))
Does that help?
This is due the fact that the maintainer has published a 2.0.0 version of bibtex-completion, but did not bump the Version: package header field.
I don't think it's bibtex-completions
version header that's wrong, but org-roam-bibtex
's dependency field. The other components of the completions repo all also depend on 1.0.0.
Did something in elpaca change how versions are checked? Because this issue definitely newer than any header changes in either package.
\Edit: actually I might have manually edited the dependency in the source file before.
Your workaround didn't work for me since it sets the version to 0? However in the dirtiest of workarounds this:
(use-package bibtex-completion
:ensure (:version (lambda (x) "2.0.0")))
works.
This is due the fact that the maintainer has published a 2.0.0 version of bibtex-completion, but did not bump the Version: package header field.
I don't think it's
bibtex-completions
version header that's wrong, butorg-roam-bibtex
's dependency field. The other components of the completions repo all also depend on 1.0.0.
Long story short:
GNU ELPA uses the "Version" package header field to detect when a version has been bumped to release a new build.
MELPA detects when a new tag (possibly matching a :version-regexp
in the package recipe) has been pushed to build a new release.
A few authors have taken to using git tags exclusively to denote release versions. Unfortunately, this necessitates a full clone of the repository to determine the version for a given ref.
Then you have the case here where there is conflicting information. The package Version claims "1.0.0", but the latest build on MELPA stable claims version "2.0.0". Elpaca tries the Version header before it tries the tags, so it ends up reporting the incorrect version in this case.
~~Did something in elpaca change how versions are checked? Because this issue definitely newer than any header changes in either package.~~
Elpaca did not check that dependency min version requirements were satisfied prior to 85bfd9843327801ef07afc435434da3df0a1895c.
\Edit: actually I might have manually edited the dependency in the source file before.
Your workaround didn't work for me since it sets the version to 0? However in the dirtiest of workarounds this:
Check the output of the full recipe with M-x elpaca-info
bibtex-completion
.
Do the :depth
, :version
, and :version-regexp
values match the values in the test case I provided? The test case correctly reports installed version: 2.0.0 bf184cc
.
If the recipe looks good, try M-x elpaca-delete
-ing and re-installing bibtex-completion.
(use-package bibtex-completion :ensure (:version (lambda (x) "2.0.0")))
works.
That's not a satisfactory workaround because it will require you to bump the version manually. I'd recommend the solution in the test case.
I have plans to add a menu with recipes for all these "naughty" packages which should shift some recipe maintenance burden from Elpaca users to me :).
I needed to delete the existing build and repo files, now it works, thanks :).
MELPA detects when a new tag (possibly matching a :version-regexp in the package recipe) has been pushed to build a new release.
So the issue with bibtex-completion
specifically seems to be that there are three MELPA packages (helm-*
, ivy-*
and bibtex-completion
) living in that repo with independent version numbers in their header but the git tag corresponds to the helm package specifically.
Lou Woell @.***> writes:
I needed to delete the existing build and repo files, now it works, thanks :).
MELPA detects when a new tag (possibly matching a :version-regexp in the package recipe) has been pushed to build a new release.
So the issue with bibtex-completion specifically seems to be that there are three MELPA packages (helm-, ivy- and bibtex-completion) living in that repo with independent version numbers in their header but the git tag corresponds to the helm package specifically.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.
Yes. Either they would have to add a :version-regexp to each MELPA recipe for the independent packages, or keep the version in sync for all of them.
Thank you @progfolio, I have these issues sorted out now. Here are the respective pieces I am using now,
auctex
and latex
(use-package auctex
:ensure (:pre-build (("./autogen.sh")
("./configure"
"--without-texmf-dir"
"--with-packagelispdir=./"
"--with-packagedatadir=./")
("make"))
:build (:not elpaca--compile-info) ;; Make will take care of this step
:files ("*.el" "doc/*.info*" "etc" "images" "latex" "style")
:version (lambda (_) (require 'tex-site) AUCTeX-version)))
(use-package latex
:ensure nil
:hook ((LaTeX-mode . prettify-symbols-mode))
:bind (:map LaTeX-mode-map
("C-S-e" . latex-math-from-calc))
:config
;; Format math as a Latex string with Calc
(defun latex-math-from-calc ()
"Evaluate `calc' on the contents of line at point."
(interactive)
(cond ((region-active-p)
(let* ((beg (region-beginning))
(end (region-end))
(string (buffer-substring-no-properties beg end)))
(kill-region beg end)
(insert (calc-eval `(,string calc-language latex
calc-prefer-frac t
calc-angle-mode rad)))))
(t (let ((l (thing-at-point 'line)))
(end-of-line 1) (kill-line 0)
(insert (calc-eval `(,l
calc-language latex
calc-prefer-frac t
calc-angle-mode rad))))))))
2. `org-roam-bibtex`, I had to delete `bibtex-completion` (which also meant both `org-ref` and `org-roam-bibtex`) before it worked for me.
(use-package bibtex-completion :ensure ( :version elpaca--latest-tag :version-regexp "[.[:digit:]]+" :depth nil))
(use-package org-roam-bibtex :ensure t :after org-roam :config (require 'org-ref))
Confirmation
Elpaca Version
Elpaca 09a94ca HEAD -> master, origin/master, origin/HEAD installer: 0.6 emacs-version: GNU Emacs 29.2 (build 2, x86_64-unknown-linux-gnu, GTK+ Version 3.24.38, cairo version 1.18.0) of 2024-01-20 git --version: git version 2.43.2
Operating System
OS: Void x86_64 Kernel: 6.6.16_1
Description
Thank you for the prompt response on the previous support request! As I continue to migrate from straight.el to elpaca, I continue to find some issues. Here is the output of my elpaca log,
Here is my relevant configuration for each of them,
auctex
&latex
:(use-package org-roam-bibtex :ensure t :after org-roam)