From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#22046: [PATCH] Improve version-to-list parsing Date: Tue, 01 Dec 2015 05:38:49 +0200 Message-ID: <83k2oyltx2.fsf@gnu.org> References: <83y4dgma7k.fsf@gnu.org> <83r3j7mqpr.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT X-Trace: ger.gmane.org 1448941163 29933 80.91.229.3 (1 Dec 2015 03:39:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 1 Dec 2015 03:39:23 +0000 (UTC) Cc: 22046@debbugs.gnu.org To: Alex Dunn Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Dec 01 04:39:13 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1a3bma-00033y-GD for geb-bug-gnu-emacs@m.gmane.org; Tue, 01 Dec 2015 04:39:12 +0100 Original-Received: from localhost ([::1]:44521 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a3bmZ-0002Cb-OR for geb-bug-gnu-emacs@m.gmane.org; Mon, 30 Nov 2015 22:39:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60204) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a3bmV-0002CU-RV for bug-gnu-emacs@gnu.org; Mon, 30 Nov 2015 22:39:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a3bmQ-0003Z4-Qr for bug-gnu-emacs@gnu.org; Mon, 30 Nov 2015 22:39:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:43803) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a3bmQ-0003Z0-NB for bug-gnu-emacs@gnu.org; Mon, 30 Nov 2015 22:39:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1a3bmQ-0007k0-BE for bug-gnu-emacs@gnu.org; Mon, 30 Nov 2015 22:39:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 01 Dec 2015 03:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22046 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 22046-submit@debbugs.gnu.org id=B22046.144894113929746 (code B ref 22046); Tue, 01 Dec 2015 03:39:02 +0000 Original-Received: (at 22046) by debbugs.gnu.org; 1 Dec 2015 03:38:59 +0000 Original-Received: from localhost ([127.0.0.1]:33511 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a3bmM-0007ji-KN for submit@debbugs.gnu.org; Mon, 30 Nov 2015 22:38:59 -0500 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:46818) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a3bmJ-0007jY-Rl for 22046@debbugs.gnu.org; Mon, 30 Nov 2015 22:38:56 -0500 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0NYN00400TC5NO00@a-mtaout22.012.net.il> for 22046@debbugs.gnu.org; Tue, 01 Dec 2015 05:38:53 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([84.94.185.246]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NYN0049RU4TRO00@a-mtaout22.012.net.il>; Tue, 01 Dec 2015 05:38:53 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:109487 Archived-At: > From: Alex Dunn > 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.