unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Mark Walters <markwalters1009@gmail.com>
To: Justus Winter <4winter@informatik.uni-hamburg.de>,
	notmuch@notmuchmail.org
Subject: Re: [PATCH 1/7] Split notmuch_database_close into two functions
Date: Tue, 17 Apr 2012 09:37:44 +0100	[thread overview]
Message-ID: <87pqb64uuf.fsf@qmul.ac.uk> (raw)
In-Reply-To: <20120416215112.15615.94985@thinkbox.jade-hamburg.de>

On Mon, 16 Apr 2012, Justus Winter <4winter@informatik.uni-hamburg.de> wrote:
> Quoting Mark Walters (2012-03-31 19:17:15)
>> Secondly, I think the patch series could be made clearer and easier to
>> review. If you do it in three steps
>> 
>> 1) change of notmuch_database_close to notmuch_database_destroy (just
>>    the function name change)
>> 2) split the new notmuch_database_destroy into two as in the current
>>    first patch
>> 3) Make any changes (if there are any) of notmuch_database_destroy to
>>    notmuch_database_close.
>> 
>> The advantage is that the first change is easy to test (essentially does
>> it build) and then changes from notmuch_database_destroy to
>> notmuch_database_close in step 3 are explicit rather than the current
>> situation where we need to grep the code to see if some instances of
>> notmuch_database_close were not changed to notmuch_database_destroy.
>
> I don't buy it. The patch series first touches the library and
> documentation and the lib compiles fine. The next patch updates the
> cli tools, all of them compile fine afterwards.
>
> Every patch addresses the issue component wise, this seems rather
> natural for me.

I will try an explain my concern better. I assume that the patch
actually introduces a functional change : that is something somewhere in
the code calls the new notmuch_database_close instead of
notmuch_database_destroy [1]. In your current patch series someone
reading the patches alone can't see the functional change: it comes from
the occurrences of notmuch_database_close that you *don't* change to
notmuch_database_destroy.

Indeed, if the only change is to allow out-of-tree code access to the
new notmuch_database_close function then doing the patch series as

rename notmuch_database_close to notmuch_database_destroy

Then split notmuch_database_destroy make it clearer. (And if the code
compiles after step 1 then I know *all* occurrences of
notmuch_database_close have been changed to notmuch_database_destroy).


Best wishes

Mark

[1] Apart, of course, from notmuch_database_destroy.

  reply	other threads:[~2012-04-17  8:37 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-21  0:55 [RFC] Split notmuch_database_close into two functions Justus Winter
2012-03-21  0:55 ` [PATCH 1/7] " Justus Winter
2012-03-31 17:17   ` Mark Walters
2012-03-31 17:29     ` David Bremner
2012-04-16 21:51     ` Justus Winter
2012-04-17  8:37       ` Mark Walters [this message]
2012-03-21  0:55 ` [PATCH 2/7] NEWS: Document the notmuch_database_close split Justus Winter
2012-03-21  0:55 ` [PATCH 3/7] Use notmuch_database_destroy instead of notmuch_database_close Justus Winter
2012-03-21  0:55 ` [PATCH 4/7] " Justus Winter
2012-03-21  0:55 ` [PATCH 5/7] go: " Justus Winter
2012-03-21  0:55 ` [PATCH 6/7] ruby: " Justus Winter
2012-03-21  0:55 ` [PATCH 7/7] python: wrap and use notmuch_database_destroy as destructor Justus Winter
2012-04-12 17:02   ` Austin Clements
2012-04-20 13:10     ` Sebastian Spaeth
2012-04-22 12:06     ` Justus Winter
2012-04-22 12:07       ` [PATCH 1/7] Split notmuch_database_close into two functions Justus Winter
2012-04-22 12:07         ` [PATCH 2/7] NEWS: Document the notmuch_database_close split Justus Winter
2012-04-22 15:09           ` Felipe Contreras
2012-04-22 12:07         ` [PATCH 3/7] Use notmuch_database_destroy instead of notmuch_database_close Justus Winter
2012-04-22 12:07         ` [PATCH 4/7] " Justus Winter
2012-04-22 12:07         ` [PATCH 5/7] go: " Justus Winter
2012-04-22 12:07         ` [PATCH 6/7] ruby: " Justus Winter
2012-04-23 12:36           ` Felipe Contreras
2012-04-23 12:49             ` Justus Winter
2012-04-25 13:39               ` Austin Clements
2012-04-22 12:07         ` [PATCH 7/7] python: wrap and use notmuch_database_destroy as destructor Justus Winter
2012-04-22 18:01         ` [PATCH 1/7] Split notmuch_database_close into two functions Austin Clements
2012-04-25 13:20           ` Justus Winter
2012-04-25 13:34             ` Austin Clements
2012-04-28 12:54             ` David Bremner
2012-04-22 18:06         ` Austin Clements
2012-03-21  8:57 ` [RFC] " Patrick Totzke
2012-03-24  9:07 ` Tomi Ollila
2012-03-27  8:19   ` Justus Winter
2012-03-27  8:19     ` [PATCH 1/7] " Justus Winter
2012-04-01  3:23 ` [RFC] " Austin Clements
2012-04-12  9:05   ` Justus Winter
2012-04-12 16:57     ` Austin Clements
2012-04-12 17:19       ` Justus Winter
     [not found]       ` <20120413083358.13321.66680@megatron>
2012-04-16 21:45         ` Justus Winter
2012-04-17  4:56           ` Tomi Ollila
2012-04-17  8:42       ` Mark Walters
2012-04-18 17:54         ` Austin Clements

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

  List information: https://notmuchmail.org/

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

  git send-email \
    --in-reply-to=87pqb64uuf.fsf@qmul.ac.uk \
    --to=markwalters1009@gmail.com \
    --cc=4winter@informatik.uni-hamburg.de \
    --cc=notmuch@notmuchmail.org \
    /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 public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).