dalanicolai / image-roll.el

Virtual scroll display engine for Emacs
80 stars 4 forks source link

Broke package retrieval #9

Closed agzam closed 2 years ago

agzam commented 2 years ago

4dd9533bd57ff0e66de11724b86d9c59c41eb21f breaks package retrieval via straight.

doom reports:

x There was an unexpected error
        Message: error
        Error: (error "Could not find package image-mode. Updating recipe repositories: (org-elpa melpa gnu-elpa-mirror el-get emacsmirror-mirror) with ‘straight-pull-recipe-repositories’ may fix this")
        Backtrace:
        (error "Could not find package %S. Updating recipe repositories: %S with `...
        (if (straight--package-built-in-p melpa-style-recipe) (throw '--cl-block-s...
        (or (straight-recipes-retrieve melpa-style-recipe nil cause) (if (straight...
        (if recipe-specified-p melpa-style-recipe (or (straight-recipes-retrieve m...
        (let* ((recipe-specified-p (listp melpa-style-recipe)) (full-melpa-style-r...
        (or (and (symbolp melpa-style-recipe) (gethash (symbol-name melpa-style-re...
        (catch '--cl-block-straight--convert-recipe-- (if (memq melpa-style-recipe...
        (straight--convert-recipe image-mode "Building image-roll")
        (let ((recipe (straight--convert-recipe (or (straight--get-overridden-reci...
        (catch '--cl-block-straight-use-package-- (let ((recipe (straight--convert...

Perhaps Package-Requires: (image-mode is not needed, since image-mode is built-in ¯\_(ツ)_/¯

workaround:

(package! image-roll :recipe
  (:host github
   :repo "dalanicolai/image-roll.el")
  :pin "c05cb95d767903c0d74193f25398fc6222ab6f7f")
tmalsburg commented 2 years ago

Same problem when installing using the following straight recipe:

(straight-use-package
 '(image-roll
   :type git
   :host github
   :repo "dalanicolai/image-roll.el"))
dalanicolai commented 2 years ago

Ah okay, thanks for reporting. That is surprising behavior, as far as I know it is not anywhere documented that that list should not include built-in packages. Well, of course it was easy enough to fix. I have removed the requirements.

tmalsburg commented 2 years ago

Thanks. And now that you say it, yes, it is surprising. Perhaps a bug in straight.el. I'll check whether they have an issue for it.

tmalsburg commented 2 years ago

Couldn't find an issue. Created one, see here https://github.com/radian-software/straight.el/issues/961

progfolio commented 2 years ago

There's nothing technically wrong with declaring a built-in Emacs package as a dependency in Package-Requires. It's just not that common. I've added image-mode to the straight-built-in-psuedo-packages variable by default. If you run into an issue like this in the future, you can append to that variable as well.

tmalsburg commented 2 years ago

I specified built-in packages in the past when I needed a certain minimal version of them.

dalanicolai commented 2 years ago

Thanks. And now that you say it, yes, it is surprising. Perhaps a bug in straight.el. I'll check whether they have an issue for it.

I had the same issue using Spacemacs/Quelpa.

dalanicolai commented 2 years ago

There's nothing technically wrong with declaring a built-in Emacs package as a dependency in Package-Requires. It's just not that common. I've added image-mode to the straight-built-in-psuedo-packages variable by default. If you run into an issue like this in the future, you can append to that variable as well.

I am not sure why it was complaining then. There was no error in the declaration, but the package manager (I guess) was complaining that there was no image-mode-0 (i.e. version 0) available. We will probably find out one day :)