progfolio / elpaca

An elisp package manager
GNU General Public License v3.0
657 stars 33 forks source link

[Bug/Support]: flymake-ruby -> elpaca--check-version: (error "Invalid version syntax: ‘DEV’ (must start with a number)") #321

Closed matta closed 4 months ago

matta commented 4 months ago

Confirmation

Elpaca Version

Elpaca d45e517 grafted, HEAD -> master, origin/master, origin/HEAD installer: 0.7 emacs-version: GNU Emacs 29.3 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.42, cairo version 1.18.0) git --version: git version 2.39.2

Operating System

OS: Debian GNU/Linux bookworm 12.5 x86_64 Host: XPS 17 9720 Kernel: Linux 6.1.0-21-amd64 Uptime: 10 days, 4 hours Packages: 3078 (dpkg), 13 (flatpak), 9 (snap), 35 (brew) Shell: zsh 5.9 Display: 3840x2400 @ 60Hz (as 1920x1200) DE: GNOME 43.9 WM: Mutter (Wayland) WM Theme: Adwaita Theme: Adwaita [GTK2/3/4] Icons: Adwaita [GTK2/3/4] Font: Cantarell (11pt) [GTK2/3/4] Cursor: Adwaita (24px) Terminal: .emacs-29.3-wra CPU: 12th Gen Intel(R) Core(TM) i7-12700H (20) @ 4.70 GHz GPU 1: NVIDIA GeForce RTX 3060 Mobile / Max-Q [Discrete] GPU 2: Intel Iris Xe Graphics @ 1.40 GHz [Integrated] Memory: 7.50 GiB / 15.31 GiB (49%) Swap: 2.26 GiB / 16.84 GiB (13%) Disk (/): 290.88 GiB / 898.95 GiB (32%) - ext4 Local IP (wlp0s20f3): 192.168.86.249/24 * Battery: 100% [AC Connected] Locale: en_US.UTF-8

Description

Seems that Elpaca fails to install https://github.com/purcell/flymake-ruby due to an invalid version associated with https://github.com/purcell/flymake-easy. See my current package info for both packages below.

Looking in to why "DEV de41ea4" got installed for flymake-easy, it appears that de41ea4 is the most recent commit on the repo, but it was a change to the README, so purcell did not tag a new release.

In any case, this feels like two possible bugs:

  1. Figuring out where "DEV de41ea4" version came from, and whether that is appropriate.
  2. Making it clearer to me, as a naive new Elpaca user, how to diagnose and address this problem. At the moment, I can't come up with a workaround on my own.
(use-package flymake-ruby
  :ensure t
  :hook (ruby-mode . flymake-ruby-load))
flymake-ruby
A flymake handler for ruby-mode files

source: MELPA
url: https://github.com/purcell/flymake-ruby
menu item recipe:
( :package "flymake-ruby"
  :repo "purcell/flymake-ruby"
  :fetcher github
  :files ("*.el" "*.el.in" "dir" "*.info"
          "*.texi" "*.texinfo" "doc/dir"
          "doc/*.info" "doc/*.texi"
          "doc/*.texinfo" "lisp/*.el" (:exclude
                                       ".dir-locals.el" "test.el" "tests.el"
                                       "*-test.el" "*-tests.el" "LICENSE"
                                       "README*" "*-pkg.el"))
  :source "MELPA")
full recipe:
( :package "flymake-ruby"
  ;; Inherited from elpaca-order-functions.
  :depth 1
  :inherit t
  :protocol https
  ;; Inherited from elpaca-menu-item.
  :source "MELPA"
  :files (:defaults)
  :fetcher github
  :repo "purcell/flymake-ruby")
dependencies:
  flymake-easy >= 0.1
dependents: nil
installed version: 0 6c320c6
statuses:
  (failed reclone unblocked blocked ref-checked-out queued)
files:
  $REPOS/flymake-ruby/flymake-ruby.el ! $BUILDS/flymake-ruby/flymake-ruby.el
log:
  [2024-06-23 10:32:24] Package queued
  [2024-06-23 10:32:24] Continued by: elpaca--process
  [2024-06-23 10:32:24] Continued by: elpaca--configure-remotes
  [2024-06-23 10:32:24] Continued by: elpaca--checkout-ref
  [2024-06-23 10:32:24] Continued by: elpaca--dispatch-build-commands
  [2024-06-23 10:32:24] Queueing Dependencies
  [2024-06-23 10:32:24] Continued by: elpaca--check-status
  [2024-06-23 10:32:24] Unblocked by: flymake-easy
  [2024-06-23 10:32:24] Checking dependency versions
  [2024-06-23 10:32:24] elpaca--check-version: (error "Invalid version syntax: ‘DEV’ (must start with a number)")

and

flymake-easy
Helpers for easily building flymake checkers

source: MELPA
url: https://github.com/purcell/flymake-easy
menu item recipe:
( :package "flymake-easy"
  :fetcher github
  :repo "purcell/flymake-easy"
  :files ("*.el" "*.el.in" "dir" "*.info"
          "*.texi" "*.texinfo" "doc/dir"
          "doc/*.info" "doc/*.texi"
          "doc/*.texinfo" "lisp/*.el" (:exclude
                                       ".dir-locals.el" "test.el" "tests.el"
                                       "*-test.el" "*-tests.el" "LICENSE"
                                       "README*" "*-pkg.el"))
  :source "MELPA")
full recipe:
( :package "flymake-easy"
  ;; Inherited from elpaca-order-functions.
  :depth 1
  :inherit t
  :protocol https
  ;; Inherited from elpaca-menu-item.
  :source "MELPA"
  :files (:defaults)
  :repo "purcell/flymake-easy"
  :fetcher github)
dependencies:
nil
dependents: 
  flymake-ruby
installed version: DEV de41ea4
statuses:
  (finished activation info unblocked continued-dep queued)
files:
  $REPOS/flymake-easy/flymake-easy.el → $BUILDS/flymake-easy/flymake-easy.el
log:
  [2024-06-23 10:32:24] Package queued
  [2024-06-23 10:32:24] Continued by: elpaca--continue-dependency
  [2024-06-23 10:32:24] Continued by: elpaca--queue-dependencies
  [2024-06-23 10:32:24] No external dependencies
  [2024-06-23 10:32:24] No Info dir file found
  [2024-06-23 10:32:24] Continued by: elpaca--add-info-path
  [2024-06-23 10:32:24] Activating package
  [2024-06-23 10:32:24] Package build dir added to load-path
  [2024-06-23 10:32:24] Caching autoloads
  [2024-06-23 10:32:24] Autoloads cached
  [2024-06-23 10:32:24] Continued by: elpaca--activate-package
  [2024-06-23 10:32:24] ✓ 0.000 secs
progfolio commented 4 months ago
  1. Figuring out where "DEV de41ea4" version came from, and whether that is appropriate.

This is the declared version (in the main elisp file for flymake-easy) followed by the git commit. "DEV" is not a valid value for the package Version header according to the Emacs manual section on packaging basics:

Version

A version number, in a form that the function version-to-list understands (e.g., ‘11.86’). Each release of a package should be accompanied by an increase in the version number so that it will be recognized as an upgrade by users querying the package archive.)

That's a bug in flymake-easy as far as I'm concerned. Worth reporting, though I wouldn't be surprised if the author is aware of this since it won't trip up ELPA tarball building machinery (DEV will be replaced by the ELPA machinery with a real version), but will any source-based package manager (straight.el if it is enhanced to check package versions; Elpaca as you've seen here).

  1. Making it clearer to me, as a naive new Elpaca user, how to diagnose and address this problem. At the moment, I can't come up with a workaround on my own.

A good place to start is searching this issue tracker for similar errors to the one you're seeing in Elpaca's log. e.g. "invalid version syntax" returns this issue. My comment there should apply in this case as well:

https://github.com/progfolio/elpaca/issues/310#issuecomment-2144155650

The wiki is also a good place to look. I don't have anything for that particular error, but there is more general section on unmet dependency versions here:

https://github.com/progfolio/elpaca/wiki/Warnings-and-Errors#unmet-dependency-version

Does that help?

matta commented 4 months ago

"DEV" is not a valid value for the package Version header according to the Emacs manual section on packaging basics:

I could see an argument that there is no requirement that the package headers must adhere to any standard, or even be present at all, in the git repo. The packaging standard governs source code at the point it is uploaded to a package repository, i.e. at the point of release. In this sense, Elpaca is ascribing a more stringent requirement than the Emacs packaging requirements do, by requiring valid packaging headers at every revision, in source control, not just the explicitly tagged releases.

In any case, this is a tough problem to solve, and the workaround you pointed me to worked just fine. Thanks!