Subject: Re: bug#74604: 30.0.92; FR: M-x package-upgrade - offer an option to show a diff on upgrade

From: Philip Kaludercic <[email-masked]>
Date: Thu, 16 Jan 2025 09:05:03 +0000

Stefan Monnier <[email-masked]> writes:

>>> Note that package-vc has something similar with the
>>> `package-vc-log-incoming' command.
>
> [ Ideally the two could/should share some aspects (UI-wise or
>   implementation-wise).  ]

Right now `package-vc-log-incoming' just re-uses `vc-log-incoming', so I
don't know how easy this would be without creating a pseudo-VC backend.

>> Showing a source-code diff may be a bit technical for some users,
>> though. I wonder if there could be either a link to a changelog, or
>> a way to encourage a changelog convention so one could be displayed
>> for users prior to a decision to update a package.
>
> The prompt could offer a choice of "just upgrade / show news /
> show diff".
>
> Currently, on the (Non)GNU ELPA side, there *is* a convention for
> a changelog file.  This is used to create the "Recent NEWS" part of
> release announcements (see
> https://lists.gnu.org/archive/html/gnu-emacs-sources/2025-01/msg00027.html
> for an example) and the "News" section on the package's web page (See
> http://elpa.gnu.org/packages/ellama.html).  But:
>
> - Many packages don't follow it (I try to shame the maintainers, but
>   maybe too softly?
>   See https://lists.gnu.org/archive/html/gnu-emacs-sources/2025-01/msg00024.html
>   for an example).
>
> - There is no convention to relate specific parts of the changelog
>   to specific versions, so we just display the first N lines (for email
>   announcements, this is arguably the right thing, since we don't know
>   what is the reader's current version).
>
> - There is even less of a convention to propagate that changelog info
>   through the ELPA protocol (i.e. from elpa.gnu.org to the users's
>   machines).

Package.el does show the contents of the "news" file in the
describe-package buffer, but we currently don't generate these on the
elpa side.

> In any case, it sounds everybody likes the idea, so I hope Someone™ will
> provide a patch soon!

I'd be glad to tackle this and a number of other package.el/elpa-related
issues that have been accumulating recently.  (I'm just submitting my
master's thesis in less than two weeks, so I a bit short on time.)

>         Stefan