On Wed, 07 May 2014 13:28:41 GMT, Mike Parker wrote:
On Wed, 07 May 2014 07:21:48 GMT, Sönke Ludwig wrote:
Exactly, tags are picked up regardless of the branch they are on. And as long as each branch uses a unique major (or minor) version, the natural version selector
~>
will make sure that people will automatically stay on that branch.Thanks for the help so far. Just to make sure I understand this... When you say
~>
will keep people on a specific branch, you mean through restricting the dependency to the range of tags that only exist on that branch? I want to make sure I completely understand this.Given branches v2.0.0, v2.0.1 and v2.0.2 (the current scheme), I now plan to add tags as follows:
v2.0.0 branch - v1.0.x tags.
v2.0.1 branch - v1.1.x tags.
v2.0.2 branch - v1.2.x tags.1) With this setup, assuming someone wants to work exclusively with the 2.0.1 branch, what should the dependency look like? If I correctly grok what you say above, it should be ~>1.1.0, correct?
2) Later on, if I add a new branch v2.1.0 with tags v2.0.x, can I assume there will be no conflict between the 2.0.x tags and the 2.0.x branches?
Once I get these last two points cleared up, I'll be ready to implement this. Assuming, of course, that it doesn't require an unreleased version of dub (with deprecated branches).
Yes, that sounds all right. ~>x.y.z
is just a short hand for >=x.y.z <x.y+1.0
, so it will exclude any versions with a different minor version. Similarly, ~>x.y
is a shorthand for >=x.y.0 <x+1.0.0
, so it would force the same major version.
BTW, I'd recommend to name the tags v1.1.x+sdl.2.0.1
and so on, so that it becomes immediately clear which SDL version is required. Oh and no new DUB version is required, the new version is supposed to just add the warning message and handles package resolution a bit different, but the version matching stays the same.