unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Mark Walters <markwalters1009@gmail.com>
To: Austin Clements <amdragon@MIT.EDU>, notmuch@notmuchmail.org
Subject: Re: [PATCH 02/11] cli: Separate current and deprecated format version
Date: Tue, 08 Oct 2013 07:48:16 +0100	[thread overview]
Message-ID: <87li24qmvj.fsf@qmul.ac.uk> (raw)
In-Reply-To: <1381185201-25197-3-git-send-email-amdragon@mit.edu>

On Mon, 07 Oct 2013, Austin Clements <amdragon@MIT.EDU> wrote:
> Previously, the CLI would print a deprecation warning if a client
> requested any format version other than the current one.  However, if
> we add fields that are backwards-compatible, but want clients to be
> able to depend on, we need to bump the version, but that doesn't make
> the older version deprecated.
>
> Hence, separate out the "minimum active" version and only print a
> warning for requests below this version number.
> ---
>  notmuch-client.h | 5 +++++
>  notmuch.c        | 2 +-
>  2 files changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/notmuch-client.h b/notmuch-client.h
> index afb0ddf..8d986f4 100644
> --- a/notmuch-client.h
> +++ b/notmuch-client.h
> @@ -142,6 +142,11 @@ chomp_newline (char *str)
>  /* The minimum supported structured output format version.  Requests
>   * for format versions below this will return an error. */
>  #define NOTMUCH_FORMAT_MIN 1
> +/* The minimum non-deprecated structured output format version.
> + * Requests for format versions below this will print a stern warning.
> + * Must be >= NOTMUCH_FORMAT_MIN and < NOTMUCH_FORMAT_CUR.
> + */

Should this be <= NOTMUCH_FORMAT_CUR ?

Best wishes

Mark

> +#define NOTMUCH_FORMAT_MIN_ACTIVE 1
>  
>  /* The output format version requested by the caller on the command
>   * line.  If no format version is requested, this will be set to
> diff --git a/notmuch.c b/notmuch.c
> index 7300c21..6588003 100644
> --- a/notmuch.c
> +++ b/notmuch.c
> @@ -125,7 +125,7 @@ by the notmuch CLI (it requires at least version %d).  You may need to\n\
>  upgrade your notmuch front-end.\n",
>  		 notmuch_format_version, NOTMUCH_FORMAT_MIN);
>  	exit (NOTMUCH_EXIT_FORMAT_TOO_OLD);
> -    } else if (notmuch_format_version != NOTMUCH_FORMAT_CUR) {
> +    } else if (notmuch_format_version < NOTMUCH_FORMAT_MIN_ACTIVE) {
>  	/* Warn about old version requests so compatibility issues are
>  	 * less likely when we drop support for a deprecated format
>  	 * versions. */
> -- 
> 1.8.4.rc3
>
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch

  reply	other threads:[~2013-10-08  6:48 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-07 22:33 [PATCH 00/11] Fix search tagging races Austin Clements
2013-10-07 22:33 ` [PATCH 01/11] schemata: Disambiguate non-terminal names Austin Clements
2013-10-07 22:33 ` [PATCH 02/11] cli: Separate current and deprecated format version Austin Clements
2013-10-08  6:48   ` Mark Walters [this message]
2013-10-09 14:08     ` Austin Clements
2013-10-07 22:33 ` [PATCH 03/11] lib: Document extent of some return values Austin Clements
2013-10-07 22:33 ` [PATCH 04/11] test: Fix missing erase-buffer in emacs test Austin Clements
2013-10-07 22:33 ` [PATCH 05/11] emacs: Move `notmuch-call-notmuch-process' to notmuch-lib Austin Clements
2013-10-07 22:33 ` [PATCH 06/11] emacs: Support passing input via `notmuch-call-notmuch-*' Austin Clements
2013-10-07 22:33 ` [PATCH 07/11] emacs: Use notmuch tag --batch for large tag queries Austin Clements
2013-10-08  7:27   ` Mark Walters
2013-10-09 14:11     ` Austin Clements
2013-10-09  7:18   ` Jani Nikula
2013-10-09  7:38     ` Mark Walters
2013-10-09 14:14       ` Austin Clements
2013-10-07 22:33 ` [PATCH 08/11] search: Add stable queries to thread search results Austin Clements
2013-10-08 16:37   ` Mark Walters
2013-10-09  7:41   ` Jani Nikula
2013-10-09 14:36     ` Austin Clements
2013-10-09 18:25       ` Jani Nikula
2013-10-07 22:33 ` [PATCH 09/11] Add TODO about more efficient stable thread queries Austin Clements
2013-10-07 22:33 ` [PATCH 10/11] emacs: Add known-broken tests for search tagging races Austin Clements
2013-10-08 16:47   ` Mark Walters
2013-10-07 22:33 ` [PATCH 11/11] emacs: Fix " Austin Clements
2013-10-08  7:56 ` [PATCH 00/11] " Mark Walters
2013-10-09 16:19   ` Austin Clements
2013-10-09  7:43 ` Mark Walters
2013-10-09 16:11   ` 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=87li24qmvj.fsf@qmul.ac.uk \
    --to=markwalters1009@gmail.com \
    --cc=amdragon@MIT.EDU \
    --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).