Re: NOTMUCH_STATUS_LAST_STATUS problematic across additive library upgrades
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Tue, 8 Dec 2015 15:55:25 +0000 (10:55 +1900)
committerW. Trevor King <wking@tremily.us>
Sat, 20 Aug 2016 21:50:07 +0000 (14:50 -0700)
e8/ecd81525ab112406f9f067a867a9239690a06c [new file with mode: 0644]

diff --git a/e8/ecd81525ab112406f9f067a867a9239690a06c b/e8/ecd81525ab112406f9f067a867a9239690a06c
new file mode 100644 (file)
index 0000000..f373717
--- /dev/null
@@ -0,0 +1,85 @@
+Return-Path: <dkg@fifthhorseman.net>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by arlo.cworth.org (Postfix) with ESMTP id 24F786DE02C9\r
+ for <notmuch@notmuchmail.org>; Tue,  8 Dec 2015 07:55:31 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.079\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.079 tagged_above=-999 required=5\r
+ tests=[AWL=-0.079] autolearn=disabled\r
+Received: from arlo.cworth.org ([127.0.0.1])\r
+ by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id MB5_Grsy_rHu for <notmuch@notmuchmail.org>;\r
+ Tue,  8 Dec 2015 07:55:29 -0800 (PST)\r
+Received: from che.mayfirst.org (che.mayfirst.org [209.234.253.108])\r
+ by arlo.cworth.org (Postfix) with ESMTP id 2EB5F6DE0217\r
+ for <notmuch@notmuchmail.org>; Tue,  8 Dec 2015 07:55:29 -0800 (PST)\r
+Received: from fifthhorseman.net (unknown [38.109.115.130])\r
+ by che.mayfirst.org (Postfix) with ESMTPSA id 5E4A3F984;\r
+ Tue,  8 Dec 2015 10:55:26 -0500 (EST)\r
+Received: by fifthhorseman.net (Postfix, from userid 1000)\r
+ id 99E9A1FF49; Tue,  8 Dec 2015 10:55:25 -0500 (EST)\r
+From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>\r
+To: Carl Worth <cworth@cworth.org>,\r
+ notmuch mailing list <notmuch@notmuchmail.org>\r
+Subject: Re: NOTMUCH_STATUS_LAST_STATUS problematic across additive library\r
+ upgrades\r
+In-Reply-To: <87bna1ms58.fsf@wondoo.home.cworth.org>\r
+References: <87y4d5q38i.fsf@alice.fifthhorseman.net>\r
+ <87vb89n83m.fsf@wondoo.home.cworth.org>\r
+ <87poyhpzbb.fsf@alice.fifthhorseman.net>\r
+ <87bna1ms58.fsf@wondoo.home.cworth.org>\r
+User-Agent: Notmuch/0.21 (http://notmuchmail.org) Emacs/24.5.1\r
+ (x86_64-pc-linux-gnu)\r
+Date: Tue, 08 Dec 2015 10:55:25 -0500\r
+Message-ID: <87fuzdoryq.fsf@alice.fifthhorseman.net>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.20\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <https://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch/>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <https://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Tue, 08 Dec 2015 15:55:31 -0000\r
+\r
+On Tue 2015-12-08 00:22:11 -0500, Carl Worth wrote:\r
+> On Mon, Dec 07 2015, Daniel Kahn Gillmor wrote:\r
+>> I note that it's exposed in the go bindings -- maybe it shouldn't be\r
+>> exposed in any of the bindings that can avoid exposing it?\r
+>\r
+> Quite likely. It's only there in C because there's no other way to know\r
+> the bounds for iterating over all possible values for a particular\r
+> enum. If other languages don't have this deficiency, then they shouldn't\r
+> need this silly thing.\r
+\r
+OK, so maybe the following patch should be applied.  Perhaps someone who\r
+understands the go bindings better than i do can comment on it?\r
+\r
+The python bindings don't seem to include LAST_STATUS, so i think\r
+they're OK.\r
+\r
+        --dkg\r
+\r
+diff --git a/bindings/go/src/notmuch/notmuch.go b/bindings/go/src/notmuch/notmuch.go\r
+index 0fff1ab..9f910cb 100644\r
+--- a/bindings/go/src/notmuch/notmuch.go\r
++++ b/bindings/go/src/notmuch/notmuch.go\r
+@@ -28,8 +28,6 @@ const (\r
+       STATUS_TAG_TOO_LONG\r
+       STATUS_UNBALANCED_FREEZE_THAW\r
+       STATUS_UNBALANCED_ATOMIC\r
+-\r
+-      STATUS_LAST_STATUS\r
+ )\r
\r
+ func (self Status) String() string {\r