[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: version numbers in ELPA
From: |
Yoni Rabkin |
Subject: |
Re: version numbers in ELPA |
Date: |
Wed, 17 Feb 2021 12:34:25 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) |
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> As I'm preparing another release of rt-liberation for ELPA I noticed
>> that in my code I have:
>>
>> ;; Version: 2.01
>>
>> ...but ELPA displays it, and makes the directories under
>> ~/.emacs.d/elpa, as "2.1".
>
> Yes, version numbers are defined in ELPA (notice: not "GNU ELPA" but
> "ELPA") as sequences of numbers. Since 1 and 01 are one and the same
> number, then ... 2.01 is the same as 2.1.
>
>> Are there some implicit rules to follow as to how we should number
>> versions going to ELPA? Are there some explicit rules I just skimmed
>> over and didn't take note of?
>
> Yes, the version numbers need to obey `version-to-list` and the actual
> string used to represent the version number in the name of the tarball
> need to be "canonicalized" by passing them to `version-to-list` and then
> recreating a corresponding string out of it with `package-version-join`
> (defined in `package.el`). This need is because the `archive-contents`
> file (which lists the tarballs available in a given ELPA server) give
> the versions in the form of a list of numbers rather than a string, and
> then `package.el` needs to "guess" the name of the corresponding tarball
> by creating a string out of it.
Understood; thank you.
I'll change the version numbering accordingly.
--
"Cut your own wood and it will warm you twice"