[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#22046: [PATCH] Improve version-to-list parsing
From: |
Eli Zaretskii |
Subject: |
bug#22046: [PATCH] Improve version-to-list parsing |
Date: |
Tue, 01 Dec 2015 05:38:49 +0200 |
> From: Alex Dunn <dunn.alex@gmail.com>
> Cc: 22046@debbugs.gnu.org
> Date: Mon, 30 Nov 2015 18:09:03 -0800
>
> The recipes MELPA uses for building packages are usually just the name,
> the repository, and the method of fetching it (git, svn, etc). To
> figure out if there’s a stable version of the package, MELPA parses the
> repository’s tags; if the tags aren’t valid version-strings (according
> to version-to-list) it assumes there isn’t a stable version available
> and packages it as “HEAD-only”.
>
> So MELPA is at the mercy of upstream developers’ tagging practices, and
> sometimes they do things like “OTP-18.0.5”: https://github.com/erlang/otp/tags
>
> Another solution to this particular problem is for MELPA to allow their
> recipes to specify a custom version schema; but my thought was that
> making version-to-list more flexible was a good thing. Parsing git tags
> seems like a common enough use-case that it might be nice to have this.
Sounds to me as a MELPA-specific problem that should be solved there,
not in Emacs.
> But it’s true that with this change some very long strings will be
> parsed as valid. This returns '(0 9), which is sort of ridiculous:
>
> (version-to-list "It’s true that with this change some very long strings will
> be parsed as valid: 0.9")
>
> But I guess I’m not sure what the danger is in letting that happen. Is
> version-to-list often used to parse arbitrary strings, where false
> positives would cause problems?
I just don't see a reason for such a radical change in behavior of a
feature that has been very stable lately.
Thanks.