all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Alex Dunn <dunn.alex@gmail.com>
Cc: 22046@debbugs.gnu.org
Subject: bug#22046: [PATCH] Improve version-to-list parsing
Date: Mon, 30 Nov 2015 17:50:24 +0200	[thread overview]
Message-ID: <83r3j7mqpr.fsf@gnu.org> (raw)
In-Reply-To: <m2egf83zx1.fsf@snow.i-did-not-set--mail-host-address--so-tickle-me>

> From: Alex Dunn <dunn.alex@gmail.com>
> Cc: 22046@debbugs.gnu.org
> Date: Sun, 29 Nov 2015 19:54:18 -0800
> 
> I’d say in both cases “0.9” is the version and /alpha-?/ is the priority
> modifier, so if one is '(0 9 -3) then they both should be.
> 
> Two other options for dealing with these cases (while keeping
> “OTP-18.0.5” -> '(18 0 5)) is to just strip the /alpha-?/ and parse
> those strings as '(0 9) or flag them as invalid version-strings.  My
> ordered preferences are:
> 
> 1. parse them both as '(0 9 -3)
> 2. treat them as invalid and throw an error
> 3. parse them as '(0 9)

The original code indeed signals an error with both "alpha0.9" and
"alpha-0.9", as expected.

But I've just realized that this is a followup to a previous patch, so
let me step back and respond to that.

> This was prompted by an issue over at MELPA, where they were having
> trouble packaging stable versions of erlang-mode due to Erlang’s odd
> version-strings: https://github.com/milkypostman/melpa/issues/2553.  So
> with this patch, 'OTP-18.0.5' is valid and parsed as '(18 0 5).

Sorry, I don't understand the issue; can you clarify?  "OTP-18.0.5" is
not a valid version string, you are supposed to submit just the
"18.0.5" part to the Emacs version-handling facilities.  Why isn't
that being done here, or why cannot it be done?  Especially since the
changes you propose effectively ignore the "OTP-" part anyway, as they
indeed should: AFAIU, "OTP" has nothing to do with versioning.

Treating "SOMETHING-1.2.3" as a valid version string changes the rules
significantly, and IMO opens a Pandora box, as we suddenly need to be
able to recognize/allow words that have nothing to do with versioning,
as opposed to a few words (alpha, beta, CVS, etc.) that do.  I don't
think we should go that way without a very good reason and some
important use cases.

> - The docstring said “22.8X3” was invalid, when it actually was; it got
>    parsed as '(22 8 24 3).  I’ve made it really invalid.

This change in behavior is definitely worth making, thanks.





  parent reply	other threads:[~2015-11-30 15:50 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-28 22:26 bug#22046: [PATCH] Improve version-to-list parsing Alex Dunn
2015-11-30  0:09 ` Alex Dunn
2015-11-30  3:34   ` Eli Zaretskii
2015-11-30  3:54     ` Alex Dunn
2015-11-30  7:59       ` Andreas Schwab
2015-11-30 15:50       ` Eli Zaretskii [this message]
2015-12-01  2:09         ` Alex Dunn
2015-12-01  3:38           ` Eli Zaretskii
2015-12-02  4:14             ` Alex Dunn
2015-12-05  9:36               ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83r3j7mqpr.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=22046@debbugs.gnu.org \
    --cc=dunn.alex@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.