Re: [PATCH 2/2] lib: introduce notmuch_database_new for initializing a database handle
authorTomi Ollila <tomi.ollila@iki.fi>
Tue, 3 Dec 2013 14:11:36 +0000 (16:11 +0200)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:58:35 +0000 (09:58 -0800)
09/4edf79f70aa252689eb71d478c9734930af8f0 [new file with mode: 0644]

diff --git a/09/4edf79f70aa252689eb71d478c9734930af8f0 b/09/4edf79f70aa252689eb71d478c9734930af8f0
new file mode 100644 (file)
index 0000000..2893fe0
--- /dev/null
@@ -0,0 +1,103 @@
+Return-Path: <tomi.ollila@iki.fi>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 4813E431FD2\r
+       for <notmuch@notmuchmail.org>; Tue,  3 Dec 2013 06:11:54 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
+       autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id qxMmLHund6jY for <notmuch@notmuchmail.org>;\r
+       Tue,  3 Dec 2013 06:11:46 -0800 (PST)\r
+Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
+       by olra.theworths.org (Postfix) with ESMTP id A2626431FC2\r
+       for <notmuch@notmuchmail.org>; Tue,  3 Dec 2013 06:11:46 -0800 (PST)\r
+Received: from guru.guru-group.fi (localhost [IPv6:::1])\r
+       by guru.guru-group.fi (Postfix) with ESMTP id B50AF100086;\r
+       Tue,  3 Dec 2013 16:11:36 +0200 (EET)\r
+From: Tomi Ollila <tomi.ollila@iki.fi>\r
+To: David Bremner <david@tethera.net>, Jani Nikula <jani@nikula.org>,\r
+       notmuch@notmuchmail.org\r
+Subject: Re: [PATCH 2/2] lib: introduce notmuch_database_new for initializing\r
+       a database handle\r
+In-Reply-To: <87wqjm2m2q.fsf@zancas.localnet>\r
+References: <cover.1385903109.git.jani@nikula.org>\r
+       <fc7ecd990e55fcfba17de4d71e8823c98760f9ce.1385903109.git.jani@nikula.org>\r
+       <87wqjm2m2q.fsf@zancas.localnet>\r
+User-Agent: Notmuch/0.17~rc1+17~ga2e1a2f (http://notmuchmail.org) Emacs/24.3.1\r
+       (x86_64-unknown-linux-gnu)\r
+X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
+       $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
+       !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
+Date: Tue, 03 Dec 2013 16:11:36 +0200\r
+Message-ID: <m2iov6m3c7.fsf@guru.guru-group.fi>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://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: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Tue, 03 Dec 2013 14:11:54 -0000\r
+\r
+On Tue, Dec 03 2013, David Bremner <david@tethera.net> wrote:\r
+\r
+> The first patch looks ok. I like the new API overall.\r
+>\r
+> As far as breaking contrib/notmuch-deliver, I'd rather fix\r
+> notmuch-insert than put effort into notmuch-deliver at this point. I\r
+> guess it could be a rough transition for people running notmuch-deliver\r
+> from git.\r
+>\r
+> Jani Nikula <jani@nikula.org> writes:\r
+>\r
+>> +/*\r
+>> + * XXX: error handling should clean up *all* state created!\r
+>> + */\r
+> is this a warning to future hackers or some current problem?\r
+>\r
+>>  notmuch_status_t\r
+>> -notmuch_database_open (const char *path,\r
+>> -                  notmuch_database_mode_t mode,\r
+>> -                  notmuch_database_t **database)\r
+>> +notmuch_database_open (notmuch_database_t *notmuch, const char *path,\r
+>> +                  notmuch_database_mode_t mode)\r
+>>  \r
+>> +/* Initialize a new, empty database handle.\r
+>> + *\r
+>\r
+> I wondered about making the new documentation adhere to doxygen?\r
+>\r
+>\r
+>> +    if (notmuch_database_open (notmuch,\r
+>> +                          notmuch_config_get_database_path (config),\r
+>> +                          NOTMUCH_DATABASE_MODE_READ_ONLY))\r
+>\r
+> Would it make any sense to migrate the mode argument to an option\r
+> setting while we're messing with the API?  \r
+\r
+if that, then also database_path to options ?\r
+\r
+I also like this suggestion best of all seen so far, but what if:\r
+\r
+  #define NOTMUCH_MAJOR_VERSION        0\r
+  #define NOTMUCH_MINOR_VERSION        17\r
+ -#define NOTMUCH_MICRO_VERSION        0\r
+ +#define NOTMUCH_MICRO_VERSION        90\r
+\r
+until changed API/ABI is set into stone (i.e. 0.18.0 at freeze time).\r
+\r
+\r
+Tomi\r