notmuch/bindings/ruby
Daniel Kahn Gillmor b10ce6bc23 database: add n_d_index_file (deprecates n_d_add_message)
We need a way to pass parameters to the indexing functionality on the
first index, not just on reindexing.  The obvious place is in
notmuch_database_add_message.  But since modifying the argument list
would break both API and ABI, we needed a new name.

I considered notmuch_database_add_message_with_params(), but the
functionality we're talking about doesn't always add a message.  It
tries to index a specific file, possibly adding a message, but
possibly doing other things, like adding terms to an existing message,
or failing to deal with message objects entirely (e.g. because the
file didn't contain a message).

So i chose the function name notmuch_database_index_file.

I confess i'm a little concerned about confusing future notmuch
developers with the new name, since we already have a private
_notmuch_message_index_file function, and the two do rather different
things.  But i think the added clarity for people linking against the
future libnotmuch and the capacity for using index parameters makes
this a worthwhile tradeoff.  (that said, if anyone has another name
that they strongly prefer, i'd be happy to go with it)

This changeset also adjusts the tests so that we test whether the new,
preferred function returns bad values (since the deprecated function
just calls the new one).

We can keep the deprecated n_d_add_message function around as long as
we like, but at the next place where we're forced to break API or ABI
we can probably choose to drop the name relatively safely.

NOTE: there is probably more cleanup to do in the ruby and go bindings
to complete the deprecation directly.  I don't know those languages
well enough to attempt a fix; i don't know how to test them; and i
don't know the culture around those languages about API additions or
deprecations.
2017-08-23 07:38:37 -03:00
..
.gitignore Use rooted paths in .gitignore files 2017-08-18 19:42:35 -03:00
database.c database: add n_d_index_file (deprecates n_d_add_message) 2017-08-23 07:38:37 -03:00
defs.h Use https instead of http where possible 2016-06-05 08:32:17 -03:00
directory.c Use https instead of http where possible 2016-06-05 08:32:17 -03:00
extconf.rb fix out of tree build 2017-03-12 09:17:29 -03:00
filenames.c Use https instead of http where possible 2016-06-05 08:32:17 -03:00
init.c Use https instead of http where possible 2016-06-05 08:32:17 -03:00
message.c Use https instead of http where possible 2016-06-05 08:32:17 -03:00
messages.c Use https instead of http where possible 2016-06-05 08:32:17 -03:00
query.c lib: replace deprecated n_q_count_threads with status returning version 2017-03-22 08:35:07 -03:00
rdoc.sh ruby: Remove the split file hack from rdoc.sh 2011-07-29 09:44:44 +03:00
README build: integrate building ruby bindings into notmuch build process 2015-06-12 09:12:28 +02:00
status.c Use https instead of http where possible 2016-06-05 08:32:17 -03:00
tags.c Use https instead of http where possible 2016-06-05 08:32:17 -03:00
thread.c Use https instead of http where possible 2016-06-05 08:32:17 -03:00
threads.c Use https instead of http where possible 2016-06-05 08:32:17 -03:00

To build the the notmuch ruby extension, run the following commands
from the *top level* notmuch source directory:

% ./configure
% make ruby-bindings

The generic documentation about building notmuch also applies.