Re: [PATCH] python-cffi: read version from notmuch version file

Subject: Re: [PATCH] python-cffi: read version from notmuch version file

Date: Tue, 23 Jun 2020 13:43:23 +0300

To: David Bremner, Floris Bruynooghe, notmuch@notmuchmail.org

Cc:

From: Frank LENORMAND


On Tue Jun 23 12:33:36 2020, David Bremner wrote:
> Frank LENORMAND <lenormf.ml@gmail.com> writes:
> > For example, 0.30.1, with the first two numbers coming from the main
> > repository, and the last one acting as major for the bindings.
> >
> > 0.29.3 → 0.29.1
> > 0.30-rc2 → 0.30.1-rc2
> > etc.
> >
> 
> I'm mainly interested in supporting two use cases for notmuch: building
> everything from source, and binary packages of released versions. We've
> already gone to some trouble to tell Emacs users that try to mix and
> match versions that they are on their own, and this seems to apply even
> more strongly to bindings users.
>    
> With that said, if Floris thinks some hierarchical version is useful,
> and is willing to maintain it, I can live with it. I would ask that:
> 
> 1) You keep the whole "upstream" version number. So the first example
> would be 0.29.3.1.  0.29.1 is a previous version of notmuch, and that
> ambiguity can only cause trouble.

The idea was that the bindings will work with the X.Y version they were
released for, since the last component in X.Y.Z is for minor changes that
shouldn't affect the API.

So we can keep X.Y from NotMuch itself, and append some information that
hint at the state of the bindings.

> 2) You don't insert things in the middle. So the second example would be
> 0.30-rc2.1

The -rc2 applies to the release of the whole project, so it applies to the
bindings as well. It can safely be placed at the back, because in the
current state of things, modifications to the bindings will cause the RC
number to increase as well.

> 3) You have some way to distinguish between the notmuch version 0.30.1,
> and the bindings version 0.30(.1) . I'd suggest using something
> different than '.'  as a separator, but I don't know what the python
> toolchain will tolerate.

That is confusing. But I don't think using a 4+ parts long version number
is relevant, because the only information we need from the base version
number are the X.Y components.

If cutting the base version number is not an acceptable solution, and using
one with 4+ components isn't either, the only other sane choice is a
completely different one, whose major component is incremented along with
the project's. Not too bad, it will just not be self-evident which bindings
were shipped with which release of NotMuch.

Or the exact same version number, but then what should happen to it when
the bindings are modified, but not NotMuch?

Regards,
-- 
Frank LENORMAND
_______________________________________________
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch

Thread: