Closed jtamagnan closed 2 months ago
Thanks for taking the time to fill out a bug report.
I noticed that installing
bbdb
through elpaca didn't work [due to] the.el.in
file is not being converted
That is an input file intended to be used by a Make script. The :pre-build recipe keyword exists for running such scripts. The following recipe adjustment should work (assuming you have the necessary tools installed on your system to allow the scripts to run):
elpaca | b8ed514 HEAD -> master, origin/master, origin/HEAD |
installer | 0.7 |
emacs | GNU Emacs 31.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.42, cairo version 1.18.0) of 2024-07-02 |
git | git version 2.45.2 |
There may be an option to skip the byte-compilation in that Make script (which I suggest, as Elpaca will take care of that better), but I'll leave that as an exercise for the reader.
I wonder if a build step is missing from the melpa recipe
https://github.com/melpa/melpa/blob/master/recipes/bbdb
or if this is something that elpaca should hande natively as was done with https://github.com/hartzell/straight.el/commit/448f563830f34f9a1011c01a2e0c7585c34d405c
The difference between MELPA and Elpaca/straight is that MELPA is producing tarballs. Straight and Elpaca are working directly from the source repositories. So not every recipe from other sources will translate perfectly. However, Elpaca is already flexible enough to handle this case. So, no adjustment is needed other than with the recipe as above.
The commit you've linked to from straight.el does not apply, as it predates the :pre-build recipe keyword, which I also added to straight.el. A similar solution to what I've shown above can be used with straight now, too.
Does that help?
@progfolio thank you for the incredibly quick and complete response. It isn't always easy seeing how everything fits together, from the outside looking in, this explanation and the one in the other ticket certainly help shed light in this otherwise dark maze.
The difference between MELPA and Elpaca/straight is that MELPA is producing tarballs. Straight and Elpaca are working directly from the source repositories.
Ahhh yes that makes sense.
So not every recipe from other sources will translate perfectly. However, Elpaca is already flexible enough to handle this case. So, no adjustment is needed other than with the recipe as above.
It seems that this implies that any user who wants to use bbdb from melpa will need to modify their elpaca/use-package statement to run the required pre-build steps. Although simple for any single user it feels like there would be a compounding cost across all users who might run into this issue.
A few questions come to mind:
straight
and elpaca
could use to get the most correct recipe?@progfolio thank you...
You're welcome!
- Are there any ways that this "fix" can be generalized or upstreamed?
If someone were interested enough they could easily host their own menu which contains recipes. This is very easy to do with Elpaca. For example, I have a package, melpulls, which scrapes the open MELPA pull requests and provides recipes so I can easily install them for review.
A menu could be even simpler than that and just be a file with the recipes and a short elisp script to provide the interface. I don't particularly want to do that myself, because then I become responsible for maintaining recipes for packages which I do not use (to a certain degree I end up receiving these issues via straight and Elpaca's trackers, but I don't offer "official" support for all ~6K recipes which are shipped with either.)
- Presumably the built-in package.el manages to properly use bbdb from melpa. Do you know how it knows to perform these build steps?
Package.el operates on the tarballs hosted on various ELPAs. It doesn't build them itself. The build tool on MELPA's side is package-build. GNU has similar build machinery which produces tarballs. I haven't looked into package-build or GNU's build machinery too deeply.
- Would there be a benefit to some other recipe format other than the melpa format that package managers like
straight
andelpaca
could use to get the most correct recipe?
GNU's :make
recipe keyword could be translated to :pre-build
steps which do the same.
It's honestly not worth the complexity considering how few packages make use of it.
A better solution would be for someone to maintain a menu offering altered recipes.
I plan on leaving that to interested parties, though.
I'll consider this issue closed for now, but feel free to comment if you have any more questions. Thanks.
Confirmation
Elpaca Version
Elpaca b8ed514 HEAD -> master, origin/master, origin/HEAD installer: 0.7 emacs-version: GNU Emacs 31.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.42, cairo version 1.18.0) git --version: git version 2.45.1
Operating System
Linux
Description
Problem
I noticed that installing
bbdb
through elpaca didn't work. This is similar to an issue that the straight package encountered https://github.com/radian-software/straight.el/issues/362. Essentially it seems like the.el.in
file is not being convertedI wonder if a build step is missing from the melpa recipe
https://github.com/melpa/melpa/blob/master/recipes/bbdb
or if this is something that elpaca should hande natively as was done with https://github.com/hartzell/straight.el/commit/448f563830f34f9a1011c01a2e0c7585c34d405cTest Case