Closed ddoherty03 closed 8 months ago
In my init, I install use-package-chords as follows:
(setq use-package-verbose t use-package-always-defer t use-package-hook-name-suffix nil use-package-compute-statistics t) (use-package use-package-chords :ensure t :demand t :config (key-chord-mode 1)) (elpaca-wait)
The key-chord version installed successfully and appears to be 0.7, but the elpaca--check-version seems to fail
I only experienced this after doing an upgrade of all packages.
Elpaca now checks dependency versions. It previously did not. Updating your packages likely updated Elpaca, too. That's why you probably did not run into this in the past.
Is this an issue with elpaca's version detection for packages?
No. The issue is that certain package authors do not follow elisp package versioning convention. Rather than specifying a "Version: " header field in the package's main file (or a *-pkg.el file), the maintainer of key-chord relies solely on git tags. To deal with this unfortunate habit, Elpaca provides several ways of working around this which are described in the wiki.
It basically boils down to informing Elpaca how to extract the version info for key-chord. See the following test case for a working recipe:
elpaca | f16b80f HEAD -> master, origin/master, origin/HEAD |
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-01-27 |
git | git version 2.43.0 |
Does that help?
@progfolio, thanks for the quick response. That makes sense. Just to be clear, exactly how would my init file change to insert this fix? Just adding this in my init before the use-package-chords
clause?:
(elpaca (key-chord :depth nil :version-regexp "\\(?:[[:digit:]]+\\.[[:digit:]]+\\)"))
or something else?
BTW, I reported an issue with the key-chord github repo, which is run by tarsius, so surprising it not being kosher.
@progfolio, thanks for the quick response.
You're welcome.
That makes sense. Just to be clear, exactly how would my init file change to insert this fix? Just adding this in my init before the
use-package-chords
clause?:(elpaca (key-chord :depth nil :version-regexp "\\(?:[[:digit:]]+\\.[[:digit:]]+\\)"))
or something else?
Yes, adding that to your init file should work. You could also wrap it in a use-package declaration if you prefer. Something to the tune of:
(use-package key-chord
:defer t
:elpaca (:depth nil :version-regexp "\\(?:[[:digit:]]+\\.[[:digit:]]+\\)"))
BTW, I reported an issue with the key-chord github repo, which is run by tarsius, so surprising it not being kosher.
Jonas does not agree that version information should be kept in the source file metadata. He prefers using git tags and will likely see this as a deficiency of Elpaca rather than issue with any package he maintains. I've laid out the argument against relying solely on git tags in an issue for hl-todo. I hope he changes his mind, but he didn't seem convinced or eager to discuss the issue. Elisp versioning has other issues, too (e.g. MELPA devising their own, conflicting versioning scheme instead of everyone adopting a semver scheme).
In any case, I plan on keeping Elpaca flexible enough to work around such situations. If you have any feedback, ideas, or suggestions on how to improve things, let me know. Thanks.
@progfolio, thanks, I think this is ripe for closing. All good now. So far, no response from Jonas. I'll repost here if that changes. Cheers.
Confirmation
Elpaca Version
Operating System
Description
In my init, I install use-package-chords as follows:
It installs
key-chord
thenbind-chord
as dependencies, but fails:The key-chord version installed successfully and appears to be 0.7, but the elpaca--check-version seems to fail
Is this an issue with elpaca's version detection for packages? I only experienced this after doing an upgrade of all packages.