bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#54747: 28.1.50; package.el - Better error message if newer Emacs is


From: Lars Ingebrigtsen
Subject: bug#54747: 28.1.50; package.el - Better error message if newer Emacs is required
Date: Fri, 08 Apr 2022 14:51:06 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Daniel Mendler <mail@daniel-mendler.de> writes:

> I am running Emacs 28 and I just went to `list-packages` and did `M-x
> package-install` on a package marked as "incompat". For some weird
> reason Emacs still installed the package while I would have expected an
> error now? Is this another bug?

Hm...  I don't know.  Let's see...

The only one I have that's incompatible (in Emacs 29) is:

  helm-gitignore                 20170211.8     incompat     melpa    Generate 
.gitignore files with gitignore.io.

And the `i' command just skips it, so that works, at least.  And using
`M-x package-install' on it just says

Package ‘gitignore-mode-1.1.0’ is unavailable

But I haven't tried this in Emacs 28.

> Regarding the error messages - I think even experienced users could
> profit from slightly improved error messages which explain dependency
> resolution failure.
>
> - Package X version V requires package Y version W, which is
> unavailable. The newest available version of Y is W'.
> - Package X version V requires package Y, which is unavailable. The
> package Y cannot be found in the archives.
> - Package X version V requires package Y version W, which cannot be
> installed. The dependency Z of Y cannot be satisfied.
> - ...

It does say some of that.  Reading the code:

               (disabled
                (unless problem
                  (setq problem
                        (if (stringp disabled)
                            (format-message
                             "Package `%s' held at version %s, but version %s 
required"
                             next-pkg disabled
                             (package-version-join next-version))
                          (format-message "Required package `%s' is disabled"
                                          next-pkg)))))
               (t (setq found pkg-desc)))))
          (unless found
            (cond
             (problem (error "%s" problem))
             (found-something
              (error "Need package `%s-%s', but only %s is available"
                     next-pkg (package-version-join next-version)
                     found-something))
             (t

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

[Prev in Thread] Current Thread [Next in Thread]