Closed moaxcp closed 6 years ago
https://semver.org/#how-should-i-deal-with-revisions-in-the-0yz-initial-development-phase
A project can only begin with the addition of feature code. Therefore, the first version will always be 0.1.0
.
A common mistake people make when starting new projects is setting their initial version to 0.0.1
, which is incorrect, as you can not patch something that does not exist.
A project can not start versioning at 0.0.0
because it infers that nothing exists, and if nothing exists, how can you even version it?
Also, @ajoberstar, in relation to this, when a project (repo) has no version tags set, and the scope
is set to patch
, reckon will erroneously produce an initial version of 0.0.1
. I'm not sure if you want to do something about this internally, or just accept it as user error.
I'm not sure this is a good reason to start at 1 instead of 0 but I am ok with it either way. A git repo often starts empty or with a read me. In some cases the build system will be put in place before any code is ready this could include adding reckon. So far there is no api code at all and nothing exists. Still, we are at version 0.1.0. But why does the initial api require the project to start at 0.1.0 instead of 0.0.0?
I think this is similar to the argument that arrays should start at index 1 instead of 0. In this case it seems more arbitrary and I don't see anything stating that projects must start at 0.1.0 in the scheme except for in the FAQ. This is why I ask the question. It seems arbitrary but every system must initialize somewhere and I'm ok with 0.1.0.
Belatedly chiming in on this...
@moaxcp It is true that when you begin, you have no or very little code, so I can see why it would seem odd to have a non-zero version. However, you're still (in my opinion) working towards an initial release, which would likely be 0.1.0.
As you say, we have to initialize somewhere, so I chose 0.0.0 as the seed we start from and reckon increments from there.
@srs-bsns 0.0.1 is probably not correct, but SemVer is pretty vague about what to do pre 1.0.0. Since 0.0.1 doesn't cause an issue in the behavior of the inference algorithm, I'm not in favor of adding to code to explicitly disallow it.
This may not be an issue but I noticed that my minor version started at 0.1.0. I was expecting it to start at 0.0.0. I'm not opposed to this but I was wondering if it should start at 0.0.0.