all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#54747: 28.1.50; package.el - Better error message if newer Emacs is required
@ 2022-04-06 12:16 Daniel Mendler
       [not found] ` <handler.54747.B.164924739831028.ack@debbugs.gnu.org>
  0 siblings, 1 reply; 11+ messages in thread
From: Daniel Mendler @ 2022-04-06 12:16 UTC (permalink / raw)
  To: 54747

When trying to install a package which requires a newer Emacs version
than available the error message is a bit confusing. This issue affects
the commands `package-install` and `package-install-from-buffer`. As an
experienced Emacs user one is probably accustomed to this error message,
but I was informed that the error message may be misleading to new Emacs
users. Would it be possible to improve this error message? A better
message could be: "The package X requires Emacs Y or newer". Thank you!





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#54747: Acknowledgement (28.1.50; package.el - Better error message if newer Emacs is required)
       [not found] ` <handler.54747.B.164924739831028.ack@debbugs.gnu.org>
@ 2022-04-06 12:20   ` Daniel Mendler
  2022-04-06 12:30     ` Daniel Mendler
  0 siblings, 1 reply; 11+ messages in thread
From: Daniel Mendler @ 2022-04-06 12:20 UTC (permalink / raw)
  To: 54747

I forgot to mention the current error message. The message is for example:

"package emacs-27.1 unavailable"

See https://github.com/minad/vertico/issues/217 for the original bug
report when a user tried to install a package from GNU ELPA on Emacs 26,
while the package requires Emacs 27.

Daniel





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#54747: Acknowledgement (28.1.50; package.el - Better error message if newer Emacs is required)
  2022-04-06 12:20   ` bug#54747: Acknowledgement (28.1.50; package.el - Better error message if newer Emacs is required) Daniel Mendler
@ 2022-04-06 12:30     ` Daniel Mendler
  2022-04-07 11:46       ` bug#54747: 28.1.50; package.el - Better error message if newer Emacs is required Lars Ingebrigtsen
  0 siblings, 1 reply; 11+ messages in thread
From: Daniel Mendler @ 2022-04-06 12:30 UTC (permalink / raw)
  To: 54747

On 4/6/22 14:20, Daniel Mendler wrote:
> I forgot to mention the current error message. The message is for example:
> 
> "package emacs-27.1 unavailable"
> 
> See https://github.com/minad/vertico/issues/217 for the original bug
> report when a user tried to install a package from GNU ELPA on Emacs 26,
> while the package requires Emacs 27.

On the other hand, `list-packages` refuses to mark the package as
installable. So maybe nothing needs to be done here? In any case it is a
very minor issue. You can probably judge better if people stumbled
before over this error message. Otherwise feel free to close the issue!

Daniel





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#54747: 28.1.50; package.el - Better error message if newer Emacs is required
  2022-04-06 12:30     ` Daniel Mendler
@ 2022-04-07 11:46       ` Lars Ingebrigtsen
  2022-04-07 11:55         ` Daniel Mendler
  2022-04-07 13:46         ` Rudolf Schlatte
  0 siblings, 2 replies; 11+ messages in thread
From: Lars Ingebrigtsen @ 2022-04-07 11:46 UTC (permalink / raw)
  To: Daniel Mendler; +Cc: 54747

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

>> I forgot to mention the current error message. The message is for example:
>> 
>> "package emacs-27.1 unavailable"
>> 
>> See https://github.com/minad/vertico/issues/217 for the original bug
>> report when a user tried to install a package from GNU ELPA on Emacs 26,
>> while the package requires Emacs 27.
>
> On the other hand, `list-packages` refuses to mark the package as
> installable. So maybe nothing needs to be done here? In any case it is a
> very minor issue. You can probably judge better if people stumbled
> before over this error message. Otherwise feel free to close the issue!

I think it makes sense to make this error message better -- people may
be calling `package-install' explicitly.

It'd be easier to debug this if I had a recipe for reproduction, though.
Do you have one handy?

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





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#54747: 28.1.50; package.el - Better error message if newer Emacs is required
  2022-04-07 11:46       ` bug#54747: 28.1.50; package.el - Better error message if newer Emacs is required Lars Ingebrigtsen
@ 2022-04-07 11:55         ` Daniel Mendler
  2022-04-08 12:51           ` Lars Ingebrigtsen
  2022-04-07 13:46         ` Rudolf Schlatte
  1 sibling, 1 reply; 11+ messages in thread
From: Daniel Mendler @ 2022-04-07 11:55 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 54747

On 4/7/22 13:46, Lars Ingebrigtsen wrote:
> I think it makes sense to make this error message better -- people may
> be calling `package-install' explicitly.
> 
> It'd be easier to debug this if I had a recipe for reproduction, though.
> Do you have one handy?

Hello Lars,

unfortunately I don't have a good recipe at hand, but you can probably
reproduce this with Emacs 26 when you try to install one of the newer
packages, e.g., my vertico package from GNU ELPA.

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?

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

Daniel





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#54747: 28.1.50; package.el - Better error message if newer Emacs is required
  2022-04-07 11:46       ` bug#54747: 28.1.50; package.el - Better error message if newer Emacs is required Lars Ingebrigtsen
  2022-04-07 11:55         ` Daniel Mendler
@ 2022-04-07 13:46         ` Rudolf Schlatte
  2022-04-08 12:47           ` Lars Ingebrigtsen
  1 sibling, 1 reply; 11+ messages in thread
From: Rudolf Schlatte @ 2022-04-07 13:46 UTC (permalink / raw)
  To: 54747

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Daniel Mendler <mail@daniel-mendler.de> writes:
>
>>> I forgot to mention the current error message. The message is for example:
>>> 
>>> "package emacs-27.1 unavailable"
>>> 
>>> See https://github.com/minad/vertico/issues/217 for the original bug
>>> report when a user tried to install a package from GNU ELPA on Emacs 26,
>>> while the package requires Emacs 27.
>>
>> On the other hand, `list-packages` refuses to mark the package as
>> installable. So maybe nothing needs to be done here? In any case it is a
>> very minor issue. You can probably judge better if people stumbled
>> before over this error message. Otherwise feel free to close the issue!
>
> I think it makes sense to make this error message better -- people may
> be calling `package-install' explicitly.
>
> It'd be easier to debug this if I had a recipe for reproduction, though.
> Do you have one handy?

I think I can reproduce this via `package-install-from-buffer', with the
buffer containing the following (the error message is "Package
'emacs-30.1' is unavailable"):



;;; package-try.el --- reproducing bug #54747 -*- lexical-binding: t; -*-

;; Author: Rudi Schlatte <rudi@constantly.at>
;; Version: 1.0
;; Package-Requires: ((emacs "30.1"))
;; Keywords: bugs

;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, version 3.

;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;; GNU General Public License for more details.

;; You should have received a copy of the GNU General Public License
;; along with this program.  If not, see <http://www.gnu.org/licenses/>.

;;; Commentary:

;; Open this file, then install via `package-install-from-buffer'

(provide 'package-try)
;;; package-try.el ends here






^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#54747: 28.1.50; package.el - Better error message if newer Emacs is required
  2022-04-07 13:46         ` Rudolf Schlatte
@ 2022-04-08 12:47           ` Lars Ingebrigtsen
  0 siblings, 0 replies; 11+ messages in thread
From: Lars Ingebrigtsen @ 2022-04-08 12:47 UTC (permalink / raw)
  To: Rudolf Schlatte; +Cc: 54747

Rudolf Schlatte <rudi@constantly.at> writes:

> I think I can reproduce this via `package-install-from-buffer', with the
> buffer containing the following (the error message is "Package
> 'emacs-30.1' is unavailable"):

Thank you; with that it was trivial to test and make the improvement.
I've now made it say

This package requires Emacs version 30.1

instead.

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





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#54747: 28.1.50; package.el - Better error message if newer Emacs is required
  2022-04-07 11:55         ` Daniel Mendler
@ 2022-04-08 12:51           ` Lars Ingebrigtsen
  2022-04-08 14:03             ` Daniel Mendler
  0 siblings, 1 reply; 11+ messages in thread
From: Lars Ingebrigtsen @ 2022-04-08 12:51 UTC (permalink / raw)
  To: Daniel Mendler; +Cc: 54747

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





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#54747: 28.1.50; package.el - Better error message if newer Emacs is required
  2022-04-08 12:51           ` Lars Ingebrigtsen
@ 2022-04-08 14:03             ` Daniel Mendler
  2022-04-09  9:47               ` Lars Ingebrigtsen
  0 siblings, 1 reply; 11+ messages in thread
From: Daniel Mendler @ 2022-04-08 14:03 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 54747

On 4/8/22 14:51, Lars Ingebrigtsen wrote:
> 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.

I just tried it again on 28. Yes, `i' skips the "imcompat" package for
me too, but `package-install' still installs the package without any
complaints.

One such "incompat" package where this happens is for example satchel
from GNU ELPA. Maybe the "incompat" label is incorrect?

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

Very well then. I also saw that you added the improved error message if
a newer Emacs version is required. Thank you! From my side the issue
about the error message can be closed.

Daniel





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#54747: 28.1.50; package.el - Better error message if newer Emacs is required
  2022-04-08 14:03             ` Daniel Mendler
@ 2022-04-09  9:47               ` Lars Ingebrigtsen
  2022-04-09 10:13                 ` Daniel Mendler
  0 siblings, 1 reply; 11+ messages in thread
From: Lars Ingebrigtsen @ 2022-04-09  9:47 UTC (permalink / raw)
  To: Daniel Mendler; +Cc: 54747

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

> One such "incompat" package where this happens is for example satchel
> from GNU ELPA. Maybe the "incompat" label is incorrect?

I did a `M-x list-packages' in Emacs 28.1, and it doesn't list satchel
as being "incompat" for me.  Very odd.  Could it be some outdated cached
data somewhere?

> Very well then. I also saw that you added the improved error message if
> a newer Emacs version is required. Thank you! From my side the issue
> about the error message can be closed.

OK; done.

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





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#54747: 28.1.50; package.el - Better error message if newer Emacs is required
  2022-04-09  9:47               ` Lars Ingebrigtsen
@ 2022-04-09 10:13                 ` Daniel Mendler
  0 siblings, 0 replies; 11+ messages in thread
From: Daniel Mendler @ 2022-04-09 10:13 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 54747

On 4/9/22 11:47, Lars Ingebrigtsen wrote:
> Daniel Mendler <mail@daniel-mendler.de> writes:
> 
>> One such "incompat" package where this happens is for example satchel
>> from GNU ELPA. Maybe the "incompat" label is incorrect?
> 
> I did a `M-x list-packages' in Emacs 28.1, and it doesn't list satchel
> as being "incompat" for me.  Very odd.  Could it be some outdated cached
> data somewhere?

Could be. The next time I recompile Emacs I will reinstall all packages
and see if the problem persists.

Daniel





^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2022-04-09 10:13 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-06 12:16 bug#54747: 28.1.50; package.el - Better error message if newer Emacs is required Daniel Mendler
     [not found] ` <handler.54747.B.164924739831028.ack@debbugs.gnu.org>
2022-04-06 12:20   ` bug#54747: Acknowledgement (28.1.50; package.el - Better error message if newer Emacs is required) Daniel Mendler
2022-04-06 12:30     ` Daniel Mendler
2022-04-07 11:46       ` bug#54747: 28.1.50; package.el - Better error message if newer Emacs is required Lars Ingebrigtsen
2022-04-07 11:55         ` Daniel Mendler
2022-04-08 12:51           ` Lars Ingebrigtsen
2022-04-08 14:03             ` Daniel Mendler
2022-04-09  9:47               ` Lars Ingebrigtsen
2022-04-09 10:13                 ` Daniel Mendler
2022-04-07 13:46         ` Rudolf Schlatte
2022-04-08 12:47           ` Lars Ingebrigtsen

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.