RejectedSoftware Forums

Sign up

Using + in versions

Given the upcoming changes of removing/deprecating the use of branches
for Dub packages I'm thinking about how to handle the Tango package, and
other packages in the same situation. The problem with Tango is that
it's in maintenance mode and basically only gets update to fix issues in
future versions of the compiler.

To me it's seems a bit pointless to bump the version continuously just
because a later version of the compiler broke the code. I was thinking
that one solution to solve this would be to have versions looking
something like this "0.99.9+dmd-2.065.0".

How will Dub handle a version tag with a plus sign, similar to the
above? Would it understand that "0.99.9+dmd-2.066.0" is a later version
than "0.99.9+dmd-2.065.0" or will it just skip everything after the plus
sign.

/Jacob Carlborg

Re: Using + in versions

On Sun, 13 Jul 2014 14:10:21 +0200, Jacob Carlborg wrote:

Given the upcoming changes of removing/deprecating the use of branches
for Dub packages I'm thinking about how to handle the Tango package, and
other packages in the same situation. The problem with Tango is that
it's in maintenance mode and basically only gets update to fix issues in
future versions of the compiler.

To me it's seems a bit pointless to bump the version continuously just
because a later version of the compiler broke the code. I was thinking
that one solution to solve this would be to have versions looking
something like this "0.99.9+dmd-2.065.0".

How will Dub handle a version tag with a plus sign, similar to the
above? Would it understand that "0.99.9+dmd-2.066.0" is a later version
than "0.99.9+dmd-2.065.0" or will it just skip everything after the plus
sign.

/Jacob Carlborg

According to the SemVer spec, it should ignore the part after the plus sign. But it's possible (but unlikely) that it would fetch the exact version anyway due to the way it resolves dependencies - I'd actually have to test to be sure (it sounds like desirable behavior, though). However, what definitely doesn't work reliably is saying something like ~>0.99.9 or >=0.99.9 to let it always get the latest version, because during relational comparisons, the build meta data part is ignored.

But generally, isn't this what patch versions are meant for? I'd probably go for something like 0.99.9+dmd.2.065.0 -> 0.99.10+dmd-2.066.0, so that the build meta data just functions as documentation. Or maybe even start 1.0.0+ if the API is stable?

Re: Using + in versions

On Sun, 13 Jul 2014 13:02:29 GMT, Sönke Ludwig wrote:

According to the SemVer spec, it should ignore the part after the plus sign. But it's possible (but unlikely) that it would fetch the exact version anyway due to the way it resolves dependencies - I'd actually have to test to be sure (it sounds like desirable behavior, though). However, what definitely doesn't work reliably is saying something like ~>0.99.9 or >=0.99.9 to let it always get the latest version, because during relational comparisons, the build meta data part is ignored.

Ok, I see.

But generally, isn't this what patch versions are meant for? I'd probably go for something like 0.99.9+dmd.2.065.0 -> 0.99.10+dmd-2.066.0, so that the build meta data just functions as documentation. Or maybe even start 1.0.0+ if the API is stable?

Yeah, perhaps. The API is stable, except for when DMD breaks it. I guess I need to hear what the current maintainer thinks about this.

/Jacob Carlborg