1 Return-Path: <m.walters@qmul.ac.uk>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id 39899431FAF
\r
6 for <notmuch@notmuchmail.org>; Mon, 7 Oct 2013 23:48:27 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-1.098 tagged_above=-999 required=5
\r
12 tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001,
\r
13 NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled
\r
14 Received: from olra.theworths.org ([127.0.0.1])
\r
15 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
16 with ESMTP id vq+E7rRkOnaw for <notmuch@notmuchmail.org>;
\r
17 Mon, 7 Oct 2013 23:48:23 -0700 (PDT)
\r
18 Received: from mail2.qmul.ac.uk (mail2.qmul.ac.uk [138.37.6.6])
\r
19 (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
\r
20 (No client certificate requested)
\r
21 by olra.theworths.org (Postfix) with ESMTPS id E07A8431FAE
\r
22 for <notmuch@notmuchmail.org>; Mon, 7 Oct 2013 23:48:22 -0700 (PDT)
\r
23 Received: from smtp.qmul.ac.uk ([138.37.6.40])
\r
24 by mail2.qmul.ac.uk with esmtp (Exim 4.71)
\r
25 (envelope-from <m.walters@qmul.ac.uk>)
\r
26 id 1VTR5d-00071M-Mk; Tue, 08 Oct 2013 07:48:20 +0100
\r
27 Received: from 93-97-24-31.zone5.bethere.co.uk ([93.97.24.31] helo=localhost)
\r
28 by smtp.qmul.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.71)
\r
29 (envelope-from <m.walters@qmul.ac.uk>)
\r
30 id 1VTR5d-0004wh-DH; Tue, 08 Oct 2013 07:48:17 +0100
\r
31 From: Mark Walters <markwalters1009@gmail.com>
\r
32 To: Austin Clements <amdragon@MIT.EDU>, notmuch@notmuchmail.org
\r
33 Subject: Re: [PATCH 02/11] cli: Separate current and deprecated format version
\r
34 In-Reply-To: <1381185201-25197-3-git-send-email-amdragon@mit.edu>
\r
35 References: <1381185201-25197-1-git-send-email-amdragon@mit.edu>
\r
36 <1381185201-25197-3-git-send-email-amdragon@mit.edu>
\r
37 User-Agent: Notmuch/0.16 (http://notmuchmail.org) Emacs/24.3.1
\r
38 (x86_64-pc-linux-gnu)
\r
39 Date: Tue, 08 Oct 2013 07:48:16 +0100
\r
40 Message-ID: <87li24qmvj.fsf@qmul.ac.uk>
\r
42 Content-Type: text/plain
\r
43 X-Sender-Host-Address: 93.97.24.31
\r
44 X-QM-SPAM-Info: Sender has good ham record. :)
\r
45 X-QM-Body-MD5: c2eda50662eedae62c3917f54ed92ea8 (of first 20000 bytes)
\r
46 X-SpamAssassin-Score: 0.0
\r
47 X-SpamAssassin-SpamBar: /
\r
48 X-SpamAssassin-Report: The QM spam filters have analysed this message to
\r
50 spam. We require at least 5.0 points to mark a message as spam.
\r
51 This message scored 0.0 points. Summary of the scoring:
\r
52 * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail
\r
53 provider * (markwalters1009[at]gmail.com)
\r
54 * 0.0 AWL AWL: From: address is in the auto white-list
\r
55 X-QM-Scan-Virus: ClamAV says the message is clean
\r
56 X-BeenThere: notmuch@notmuchmail.org
\r
57 X-Mailman-Version: 2.1.13
\r
59 List-Id: "Use and development of the notmuch mail system."
\r
60 <notmuch.notmuchmail.org>
\r
61 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
62 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
63 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
64 List-Post: <mailto:notmuch@notmuchmail.org>
\r
65 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
66 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
67 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
68 X-List-Received-Date: Tue, 08 Oct 2013 06:48:27 -0000
\r
70 On Mon, 07 Oct 2013, Austin Clements <amdragon@MIT.EDU> wrote:
\r
71 > Previously, the CLI would print a deprecation warning if a client
\r
72 > requested any format version other than the current one. However, if
\r
73 > we add fields that are backwards-compatible, but want clients to be
\r
74 > able to depend on, we need to bump the version, but that doesn't make
\r
75 > the older version deprecated.
\r
77 > Hence, separate out the "minimum active" version and only print a
\r
78 > warning for requests below this version number.
\r
80 > notmuch-client.h | 5 +++++
\r
82 > 2 files changed, 6 insertions(+), 1 deletion(-)
\r
84 > diff --git a/notmuch-client.h b/notmuch-client.h
\r
85 > index afb0ddf..8d986f4 100644
\r
86 > --- a/notmuch-client.h
\r
87 > +++ b/notmuch-client.h
\r
88 > @@ -142,6 +142,11 @@ chomp_newline (char *str)
\r
89 > /* The minimum supported structured output format version. Requests
\r
90 > * for format versions below this will return an error. */
\r
91 > #define NOTMUCH_FORMAT_MIN 1
\r
92 > +/* The minimum non-deprecated structured output format version.
\r
93 > + * Requests for format versions below this will print a stern warning.
\r
94 > + * Must be >= NOTMUCH_FORMAT_MIN and < NOTMUCH_FORMAT_CUR.
\r
97 Should this be <= NOTMUCH_FORMAT_CUR ?
\r
103 > +#define NOTMUCH_FORMAT_MIN_ACTIVE 1
\r
105 > /* The output format version requested by the caller on the command
\r
106 > * line. If no format version is requested, this will be set to
\r
107 > diff --git a/notmuch.c b/notmuch.c
\r
108 > index 7300c21..6588003 100644
\r
111 > @@ -125,7 +125,7 @@ by the notmuch CLI (it requires at least version %d). You may need to\n\
\r
112 > upgrade your notmuch front-end.\n",
\r
113 > notmuch_format_version, NOTMUCH_FORMAT_MIN);
\r
114 > exit (NOTMUCH_EXIT_FORMAT_TOO_OLD);
\r
115 > - } else if (notmuch_format_version != NOTMUCH_FORMAT_CUR) {
\r
116 > + } else if (notmuch_format_version < NOTMUCH_FORMAT_MIN_ACTIVE) {
\r
117 > /* Warn about old version requests so compatibility issues are
\r
118 > * less likely when we drop support for a deprecated format
\r
123 > _______________________________________________
\r
124 > notmuch mailing list
\r
125 > notmuch@notmuchmail.org
\r
126 > http://notmuchmail.org/mailman/listinfo/notmuch
\r