Proposal: changes to version.IsDev

David Cheney david.cheney at canonical.com
Fri Mar 22 00:56:01 UTC 2013


I agree. We (well, I) have not been following the mantra that odd 
_patch_ numbers are dev versions and in fact rely on the ability to burn 
a patch number if I screw up the release.

I'd even go futher and make

IsDev() boot { return isOdd(v.Minor) }

I don't know what the v.Build restriction is, we don't produce tools 
with a x.y.z.B version string so this hasn't been battle tested either.

Dave

On 22/03/13 08:33, Tim Penhey wrote:
> Hi again...
>
> // IsDev returns whether the version represents a development
> // version. A version with an odd-numbered major, minor
> // or patch version is considered to be a development version.
> func (v Number) IsDev() bool {
> 	return isOdd(v.Major) || isOdd(v.Minor) || isOdd(v.Patch) || v.Build > 0
> }
>
>
> To me this seems a little extreme.
>
> In other projects I have worked on, an odd minor version number is
> sufficient to say that something is a development version.  Not any odd
> number.
>
> This would mean:
>   2.0.0  - is a release
>   2.1.0  - is a development version
>   2.2.1  - would become a released version (2.2 with a patch)
>   3.0.0  - would be a release version
>
>
> So.. proposal would be to simplify the function to be:
>
> func (v Number) IsDev() bool {
> 	return isOdd(v.Minor) || v.Build > 0
> }
>
>
> Any objections?
>
> Tim
>



More information about the Juju-dev mailing list