Subject: bug#69528: 30.0.50; [BUG] transient.el is not a member of package--builtin-versions

From: Stefan Monnier <[email-masked]>
Date: Tue, 04 Jun 2024 18:34:35 -0400

>>>>> * lisp/emacs-lisp/lisp-mnt.el (lm-version): Prefer version in the
>>>>> "Package-Version:" header.  (Bug#69528)
>>>> BTW, I think this is a backward-incompatible change.
>>>> Whether we want `lm-version` to return the info from `Version:` or from
>>>> `Package-Version:` depends on what we want to do with it.
> AFAICT, we currently use it in `lm-report-bug' and with Joseph's patch
> we will use it also for `loaddefs-generate--parse-file'.

`lm-report-bug` does not seem directly related to ELPA packaging, so it
makes sense to use just `Version:` there, which is presumably the format
that the maintainer favors (where the `Package-Version:` header is
instead the format that the maintainer was forced to add to accommodate
the restrictions of the ELPA protocol).

In contrast, `loaddefs-generate--parse-file' is about generating info
for `package.el`, so this one *does* want to use `Package-Version:`
if it's present.

Of course `lm-report-bug` would work likely fine as well if it uses
`Package-Version:`.  The distinction is probably not that important in
that case.

> I don't have a strong opinion, but there seems to be a mismatch between
> what the code does and what the documentation says.
>
>     "The version number comes from the ‘Package-Version’ header, if it
>     exists, or from the ‘Version’ header otherwise."
>
>     (info "(elisp) Simple Packages")

Definitely.  My only point was that the patch changed `lm-version` in
a backward incompatible way (tho arguably a minor one) without even
mentioning it.
Maybe it's OK to do that, but let's do it consciously.
If not, then we'll presumably add a new `lm-package-version` (which
wouldn't look at RCS keywords either).

        Stefan