notmuch/lib
Daniel Kahn Gillmor eb232ee0ab reindex: drop notmuch_param_t, use notmuch_indexopts_t instead
There are at least three places in notmuch that can trigger an
indexing action:

 * notmuch new
 * notmuch insert
 * notmuch reindex

I have plans to add some indexing options (e.g. indexing the cleartext
of encrypted parts, external filters, automated property injection)
that should properly be available in all places where indexing
happens.

I also want those indexing options to be exposed by (and constrained
by) the libnotmuch C API.

This isn't yet an API break because we've never made a release with
notmuch_param_t.

These indexing options are relevant in the listed places (and in the
libnotmuch analogues), but they aren't relevant in the other kinds of
functionality that notmuch offers (e.g. dump/restore, tagging, search,
show, reply).

So i think a generic "param" object isn't well-suited for this case.
In particular:

 * a param object sounds like it could contain parameters for some
   other (non-indexing) operation.  This sounds confusing -- why would
   i pass non-indexing parameters to a function that only does
   indexing?

 * bremner suggests online a generic param object would actually be
   passed as a list of param objects, argv-style.  In this case (at
   least in the obvious argv implementation), the params might be some
   sort of generic string.  This introduces a problem where the API of
   the library doesn't grow as new options are added, which means that
   when code outside the library tries to use a feature, it first has
   to test for it, and have code to handle it not being available.
   The indexopts approach proposed here instead makes it clear at
   compile time and at dynamic link time that there is an explicit
   dependency on that feature, which allows automated tools to keep
   track of what's needed and keeps the actual code simple.

My proposal adds the notmuch_indexopts_t as an opaque struct, so that
we can extend the list of options without causing ABI breakage.

The cost of this proposal appears to be that the "boilerplate" API
increases a little bit, with a generic constructor and destructor
function for the indexopts struct.

More patches will follow that make use of this indexopts approach.
2017-08-23 07:55:12 -03:00
..
add-message.cc reindex: drop notmuch_param_t, use notmuch_indexopts_t instead 2017-08-23 07:55:12 -03:00
built-with.c lib: add built_with handling for XAPIAN_DB_RETRY_LOCK 2016-06-29 09:05:49 +02:00
config.cc Use https instead of http where possible 2016-06-05 08:32:17 -03:00
database-private.h lib: isolate n_d_add_message and helper functions into own file 2017-08-01 21:17:47 -04:00
database.cc database: move striping of trailing '/' into helper function 2017-08-22 18:47:51 -03:00
directory.cc lib: update cached mtime in notmuch_directory_set_mtime 2016-08-23 20:58:46 -03:00
filenames.c Use https instead of http where possible 2016-06-05 08:32:17 -03:00
index.cc lib: paper over allocation difference 2017-07-14 21:23:52 -03:00
indexopts.c reindex: drop notmuch_param_t, use notmuch_indexopts_t instead 2017-08-23 07:55:12 -03:00
Makefile fix sum moar typos [build scripts, Makefiles] 2011-06-23 15:44:59 -07:00
Makefile.local reindex: drop notmuch_param_t, use notmuch_indexopts_t instead 2017-08-23 07:55:12 -03:00
message-file.c lib: refactor notmuch_database_add_message header parsing 2017-08-01 21:17:47 -04:00
message-id.c lib: factor out message-id parsing to separate file. 2017-08-01 21:17:47 -04:00
message-private.h lib: basic message-property API 2016-09-21 18:14:24 -03:00
message-property.cc Replace index(3) with strchr(3) 2017-04-20 06:59:22 -03:00
message.cc reindex: drop notmuch_param_t, use notmuch_indexopts_t instead 2017-08-23 07:55:12 -03:00
messages.c Use https instead of http where possible 2016-06-05 08:32:17 -03:00
notmuch-private.h lib: add notmuch_message_reindex 2017-08-01 21:17:47 -04:00
notmuch.h reindex: drop notmuch_param_t, use notmuch_indexopts_t instead 2017-08-23 07:55:12 -03:00
notmuch.sym build: switch to hiding libnotmuch symbols by default 2017-05-12 07:17:18 -03:00
parse-time-vrp.cc Use https instead of http where possible 2016-06-05 08:32:17 -03:00
parse-time-vrp.h Use https instead of http where possible 2016-06-05 08:32:17 -03:00
query-fp.cc Use https instead of http where possible 2016-06-05 08:32:17 -03:00
query-fp.h Use https instead of http where possible 2016-06-05 08:32:17 -03:00
query.cc build: visibility=default for library structs is no longer needed 2017-05-13 08:38:18 -03:00
regexp-fields.cc lib: Add regexp expansion for for tags and paths 2017-05-09 07:44:29 -03:00
regexp-fields.h lib: Add regexp searching for mid: prefix 2017-05-09 07:44:15 -03:00
sha1.c lib: use glib for sha1 digests instead of embedding libsha1 2017-01-08 10:50:38 -04:00
string-list.c lib: add notmuch_message_count_files 2017-08-01 21:17:47 -04:00
string-map.c lib: add talloc reference from string map iterator to map 2016-09-24 10:08:45 -03:00
tags.c Use https instead of http where possible 2016-06-05 08:32:17 -03:00
thread.cc lib: add notmuch_thread_get_total_files 2017-08-01 21:17:47 -04:00