progfolio / elpaca

An elisp package manager
GNU General Public License v3.0
634 stars 31 forks source link

[Support]: Install of bind-chord failing because of key-chord version #249

Closed ddoherty03 closed 8 months ago

ddoherty03 commented 8 months ago

Confirmation

Elpaca Version

Elpaca f16b80f HEAD -> master, origin/master, origin/HEAD
installer:      0.6
emacs-version:  GNU Emacs 29.2.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, cairo version 1.16.0)
 of 2024-01-25
git --version:  git version 2.34.1

Operating System

LSB Version:    core-11.1.0ubuntu4-noarch:printing-11.1.0ubuntu4-noarch:security-11.1.0ubuntu4-noarch
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.3 LTS
Release:    22.04
Codename:   jammy

Description

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)

It installs key-chord then bind-chord as dependencies, but fails:

  [2024-01-30 09:20:53] Package queued
  [2024-01-30 09:20:53] Continued by: elpaca--continue-dependency
  [2024-01-30 09:20:53] Continued by: elpaca--dispatch-build-commands
  [2024-01-30 09:20:53] Queueing Dependencies
  [2024-01-30 09:20:53] Continued by: elpaca--queue-dependencies
  [2024-01-30 09:20:53] Checking dependency versions
  [2024-01-30 09:20:53] Requires key-chord minimum version: 0.6
  [2024-01-30 09:20:53] Continued by: elpaca--check-version

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.

progfolio commented 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:

Test Case [How to run this test?](https://github.com/progfolio/elpaca/wiki/Troubleshooting#the-elpaca-test-macro) ```emacs-lisp (elpaca-test :init (elpaca (key-chord :depth nil :version-regexp "\\(?:[[:digit:]]+\\.[[:digit:]]+\\)")) (elpaca use-package-chords) (elpaca-wait) (elpaca-test-log ".*")) ```
Host Env
elpacaf16b80f HEAD -> master, origin/master, origin/HEAD
installer0.6
emacsGNU 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
gitgit version 2.43.0
Output ```emacs-lisp Elpaca menu item cache discarded due to version change. INFO Scraping files for loaddefs... INFO Scraping files for loaddefs...done GEN ../elpaca-autoloads.el Cloning into '/tmp/elpaca.76gETN/elpaca/repos/elpaca'... Your branch is up to date with 'origin/master'. Checking /tmp/elpaca.76gETN/elpaca/repos/elpaca... Compiling /tmp/elpaca.76gETN/elpaca/repos/elpaca/elpaca-info.el... Compiling /tmp/elpaca.76gETN/elpaca/repos/elpaca/elpaca-log.el... Compiling /tmp/elpaca.76gETN/elpaca/repos/elpaca/elpaca-manager.el... Compiling /tmp/elpaca.76gETN/elpaca/repos/elpaca/elpaca-menu-elpa.el... Compiling /tmp/elpaca.76gETN/elpaca/repos/elpaca/elpaca-menu-melpa.el... Compiling /tmp/elpaca.76gETN/elpaca/repos/elpaca/elpaca-menu-org.el... Compiling /tmp/elpaca.76gETN/elpaca/repos/elpaca/elpaca-process.el... Compiling /tmp/elpaca.76gETN/elpaca/repos/elpaca/elpaca-test.el... Compiling /tmp/elpaca.76gETN/elpaca/repos/elpaca/elpaca-ui.el... Compiling /tmp/elpaca.76gETN/elpaca/repos/elpaca/elpaca.el... Checking /tmp/elpaca.76gETN/elpaca/repos/elpaca/doc... Compiling /tmp/elpaca.76gETN/elpaca/repos/elpaca/doc/early-init.el... Compiling /tmp/elpaca.76gETN/elpaca/repos/elpaca/doc/init.el... Checking /tmp/elpaca.76gETN/elpaca/repos/elpaca/extensions... Compiling /tmp/elpaca.76gETN/elpaca/repos/elpaca/extensions/elpaca-use-package.el... Checking /tmp/elpaca.76gETN/elpaca/repos/elpaca/images... Checking /tmp/elpaca.76gETN/elpaca/repos/elpaca/test... Compiling /tmp/elpaca.76gETN/elpaca/repos/elpaca/test/elpaca-test.el... Done (Total of 11 files compiled, 3 skipped in 4 directories) Downloading MELPA recipes... Downloading MELPA recipes...100% Downloading NonGNU-devel ELPA... Downloading GNU-devel ELPA... Downloading NonGNU ELPA... Downloading GNU ELPA... elpaca-log: ".*" " elpaca unblocked No external dependencies 05.899964 elpaca unblocked Checking dependency versions 05.900221 elpaca linking Linking build files 05.900425 elpaca linking Build files linked 05.901581 elpaca autoloads Generating autoloads: /tmp/elpaca.76gETN/elpaca/builds/elpaca 05.902118 key-chord cloning Cloning 05.902418 use-package-chords cloning Cloning 05.902950 elpaca autoloads INFO Scraping files for loaddefs... 06.004469 elpaca autoloads INFO Scraping files for loaddefs...done 06.015135 elpaca autoloads GEN elpaca-autoloads.el 06.019459 elpaca autoloads Autoloads Generated 06.020016 elpaca byte-compilation Byte compiling 06.020452 elpaca byte-compilation Checking /tmp/elpaca.76gETN/elpaca/builds/elpaca... 06.071125 elpaca byte-compilation Compiling /tmp/elpaca.76gETN/elpaca/builds/elpaca/elpaca-autoloads.el... 06.077465 elpaca byte-compilation Compiling /tmp/elpaca.76gETN/elpaca/builds/elpaca/elpaca-info.el... 06.077937 elpaca byte-compilation Compiling /tmp/elpaca.76gETN/elpaca/builds/elpaca/elpaca-log.el... 06.153032 elpaca byte-compilation Compiling /tmp/elpaca.76gETN/elpaca/builds/elpaca/elpaca-manager.el... 06.159502 elpaca byte-compilation Compiling /tmp/elpaca.76gETN/elpaca/builds/elpaca/elpaca-menu-elpa.el... 06.168708 elpaca byte-compilation Compiling /tmp/elpaca.76gETN/elpaca/builds/elpaca/elpaca-menu-melpa.el... 06.169208 elpaca byte-compilation Compiling /tmp/elpaca.76gETN/elpaca/builds/elpaca/elpaca-menu-org.el... 06.169671 elpaca byte-compilation Compiling /tmp/elpaca.76gETN/elpaca/builds/elpaca/elpaca-process.el... 06.170231 elpaca byte-compilation Compiling /tmp/elpaca.76gETN/elpaca/builds/elpaca/elpaca-test.el... 06.174557 elpaca byte-compilation Compiling /tmp/elpaca.76gETN/elpaca/builds/elpaca/elpaca-ui.el... 06.178589 elpaca byte-compilation Compiling /tmp/elpaca.76gETN/elpaca/builds/elpaca/elpaca.el... 06.194847 key-chord cloning Resolving deltas: 100% (20/20), done. 06.211768 key-chord unblocked No external dependencies 06.212966 key-chord unblocked Checking dependency versions 06.213401 key-chord linking Linking build files 06.213957 key-chord linking Build files linked 06.215098 key-chord autoloads Generating autoloads: /tmp/elpaca.76gETN/elpaca/builds/key-chord 06.215752 use-package-chords cloning Resolving deltas: 100% (3/3), done. 06.254639 use-package-chords blocked Blocked by: (key-chord bind-chord) 06.256527 elpaca byte-compilation Done (Total of 10 files compiled, 1 skipped) 06.257074 elpaca byte-compilation Byte compilation complete 06.259740 elpaca info Compiling Info files 06.260275 key-chord autoloads INFO Scraping files for loaddefs... 06.326021 key-chord autoloads INFO Scraping files for loaddefs...done 06.330262 key-chord autoloads GEN key-chord-autoloads.el 06.331058 key-chord autoloads Autoloads Generated 06.331608 key-chord byte-compilation Byte compiling 06.331984 key-chord byte-compilation Checking /tmp/elpaca.76gETN/elpaca/builds/key-chord... 06.397076 key-chord byte-compilation Compiling /tmp/elpaca.76gETN/elpaca/builds/key-chord/key-chord-autoloads.el... 06.402088 key-chord byte-compilation Compiling /tmp/elpaca.76gETN/elpaca/builds/key-chord/key-chord.el... 06.402795 key-chord byte-compilation Done (Total of 1 file compiled, 1 skipped) 06.412113 key-chord byte-compilation Byte compilation complete 06.413953 key-chord info Compiling Info files 06.414602 key-chord info Info source files not found 06.415176 key-chord activation Activating package 06.415581 key-chord activation Package build dir added to load-path 06.415954 key-chord activation Caching autoloads 06.416344 key-chord activation Autoloads cached 06.416963 bind-chord unblocked Unblocked by: key-chord 06.417430 bind-chord unblocked Checking dependency versions 06.417845 bind-chord linking Linking build files 06.420399 bind-chord linking Build files linked 06.421419 bind-chord autoloads Generating autoloads: /tmp/elpaca.76gETN/elpaca/builds/bind-chord 06.422346 use-package-chords blocked Blocked by: (bind-chord) 06.423095 key-chord finished ✓ 0.520 secs 06.423562 elpaca info Info compiled 06.456619 elpaca info Installing Info files 06.457478 elpaca info /tmp/elpaca.76gETN/elpaca/builds/elpaca/elpaca.info 06.458862 elpaca info Info installed 06.460506 elpaca info Adding Info path 06.461142 elpaca finished ✓ 0.564 secs 06.461780 bind-chord autoloads INFO Scraping files for loaddefs... 06.530584 bind-chord autoloads INFO Scraping files for loaddefs...done 06.534399 bind-chord autoloads GEN bind-chord-autoloads.el 06.534955 bind-chord autoloads Autoloads Generated 06.535369 bind-chord byte-compilation Byte compiling 06.535729 bind-chord byte-compilation Checking /tmp/elpaca.76gETN/elpaca/builds/bind-chord... 06.588935 bind-chord byte-compilation Compiling /tmp/elpaca.76gETN/elpaca/builds/bind-chord/bind-chord-autoloads.el... 06.597909 bind-chord byte-compilation Compiling /tmp/elpaca.76gETN/elpaca/builds/bind-chord/bind-chord.el... 06.598637 bind-chord byte-compilation Done (Total of 1 file compiled, 1 skipped) 06.633455 bind-chord byte-compilation Byte compilation complete 06.636373 bind-chord info Compiling Info files 06.637024 bind-chord info Info source files not found 06.637727 bind-chord activation Activating package 06.638282 bind-chord activation Package build dir added to load-path 06.638740 bind-chord activation Caching autoloads 06.639094 bind-chord activation Autoloads cached 06.639635 use-package-chords unblocked Unblocked by: bind-chord 06.640014 use-package-chords unblocked Checking dependency versions 06.640338 use-package-chords linking Linking build files 06.642454 use-package-chords linking Build files linked 06.643484 use-package-chords autoloads Generating autoloads: /tmp/elpaca.76gETN/elpaca/builds/use-package-chords 06.644271 bind-chord finished ✓ 0.384 secs 06.644970 use-package-chords autoloads INFO Scraping files for loaddefs... 06.750819 use-package-chords autoloads INFO Scraping files for loaddefs...done 06.754807 use-package-chords autoloads GEN use-package-chords-autoloads.el 06.755324 use-package-chords autoloads Autoloads Generated 06.755722 use-package-chords byte-compilation Byte compiling 06.756085 use-package-chords byte-compilation Checking /tmp/elpaca.76gETN/elpaca/builds/use-package-chords... 06.811783 use-package-chords byte-compilation Compiling /tmp/elpaca.76gETN/elpaca/builds/use-package-chords/use-package-chords-autoloads.el... 06.821441 use-package-chords byte-compilation Compiling /tmp/elpaca.76gETN/elpaca/builds/use-package-chords/use-package-chords.el... 06.822900 use-package-chords byte-compilation Done (Total of 1 file compiled, 1 skipped) 06.863686 use-package-chords byte-compilation Byte compilation complete 06.866558 use-package-chords info Compiling Info files 06.867104 use-package-chords info Info source files not found 06.867506 use-package-chords activation Activating package 06.867883 use-package-chords activation Package build dir added to load-path 06.884944 use-package-chords activation Caching autoloads 06.885480 use-package-chords activation Autoloads cached 06.885969 use-package-chords finished ✓ 0.989 secs 06.886358 " Test Env Elpaca f16b80f HEAD -> master, origin/master, origin/HEAD installer: 0.6 emacs-version: 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 --version: git version 2.43.0 ```

Does that help?

ddoherty03 commented 8 months ago

@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 commented 8 months ago

@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.

ddoherty03 commented 8 months ago

@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.