NOTMUCH_STATUS_LAST_STATUS problematic across additive library upgrades
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Mon Dec 7 16:19:04 PST 2015
On Mon 2015-12-07 18:37:33 -0500, Carl Worth wrote:
> Can you envision a scenario where this would actually lead to a bug?
>
> It's meant to provide a convenience. It's clearly documented as "not an
> actual status value", so, yes, no client code should ever be passing
> that value into the library.
The only place a client can pass the value into the library is in
notmuch_status_to_string(), which is actually OK -- the library itself
will be able to tell the client what the status means, even if the
client didn't know about the status value itself.
I could see some hyper-correct client saying "whoa, we actually got a
status >= NOTMUCH_STATUS_LAST_STATUS; something must be horribly
broken!" and bailing unreasonably, but maybe we can safely say "don't do
that".
I note that it's exposed in the go bindings -- maybe it shouldn't be
exposed in any of the bindings that can avoid exposing it?
--dkg
More information about the notmuch
mailing list