Re: [PATCH v4 16/16] add "notmuch reindex" subcommand
[notmuch-archives.git] / 4d / e57156ed8555841ab40f460be242ea101a0e7f
1 Return-Path: <tomi.ollila@iki.fi>\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 63F4D431FAF\r
6         for <notmuch@notmuchmail.org>; Wed, 25 Jul 2012 20:24:48 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
12         autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id j0YDdqq8+JuD for <notmuch@notmuchmail.org>;\r
16         Wed, 25 Jul 2012 20:24:47 -0700 (PDT)\r
17 Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
18         by olra.theworths.org (Postfix) with ESMTP id B68C7431FAE\r
19         for <notmuch@notmuchmail.org>; Wed, 25 Jul 2012 20:24:47 -0700 (PDT)\r
20 Received: by guru.guru-group.fi (Postfix, from userid 501)\r
21         id 4227E10014E; Thu, 26 Jul 2012 06:24:58 +0300 (EEST)\r
22 From: Tomi Ollila <tomi.ollila@iki.fi>\r
23 To: Austin Clements <amdragon@MIT.EDU>, notmuch@notmuchmail.org\r
24 Subject: Re: [PATCH 01/13] test: Uniformly canonicalize actual and expected\r
25         JSON\r
26 In-Reply-To: <1343183693-17134-2-git-send-email-amdragon@mit.edu>\r
27 References: <1343183693-17134-1-git-send-email-amdragon@mit.edu>\r
28         <1343183693-17134-2-git-send-email-amdragon@mit.edu>\r
29 User-Agent: Notmuch/0.13.2+103~g9610d35 (http://notmuchmail.org) Emacs/23.1.1\r
30         (x86_64-redhat-linux-gnu)\r
31 X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
32         $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
33         !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
34 Date: Thu, 26 Jul 2012 06:24:58 +0300\r
35 Message-ID: <m2629bcigl.fsf@guru.guru-group.fi>\r
36 MIME-Version: 1.0\r
37 Content-Type: text/plain; charset=us-ascii\r
38 X-BeenThere: notmuch@notmuchmail.org\r
39 X-Mailman-Version: 2.1.13\r
40 Precedence: list\r
41 List-Id: "Use and development of the notmuch mail system."\r
42         <notmuch.notmuchmail.org>\r
43 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
44         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
45 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
46 List-Post: <mailto:notmuch@notmuchmail.org>\r
47 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
48 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
49         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
50 X-List-Received-Date: Thu, 26 Jul 2012 03:24:48 -0000\r
51 \r
52 On Wed, Jul 25 2012, Austin Clements <amdragon@MIT.EDU> wrote:\r
53 \r
54 > Previously, we used a variety of ad-hoc canonicalizations for JSON\r
55 > output in the test suite, but were ultimately very sensitive to JSON\r
56 > irrelevancies such as whitespace.  This introduces a new test\r
57 > comparison function, test_expect_equal_json, that first pretty-prints\r
58 > *both* the actual and expected JSON and the compares the result.\r
59 >\r
60 > The current implementation of this simply uses Python's json.tool to\r
61 > perform pretty-printing (with a fallback to the identity function if\r
62 > parsing fails).  However, since the interface it introduces is\r
63 > semantically high-level, we could swap in other mechanisms in the\r
64 > future, such as another pretty-printer or something that does not\r
65 > re-order object keys (if we decide that we care about that).\r
66 \r
67 \r
68 The whole series looks good to me and was easy to read through.\r
69 The use of Python json.tool is pretty reasonable; It is shipped in\r
70 Python 2.6+ (For example perl does not ship json components by default,\r
71 making it more complicated to set up for this purpose). If that is too\r
72 "much", then we could also use tr -d '[:space:]' as an intermediate\r
73 solution (but that eats whitespace in quoted content too...)\r
74 \r
75 I'll be afk for a few days then I test this... \r
76 \r
77 Tomi\r