# Versioning after release

**URL:** <https://discourse.mc-stan.org/t/versioning-after-release/19803>\
**Category:** Developers\
**Created:** [December 14, 2020, 4:00pm UTC](https://discourse.mc-stan.org/t/versioning-after-release/19803 "2020-12-14T16:00:31Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![rok\_cesnovar](https://avatars.discourse-cdn.com/v4/letter/r/7bcc69/32.png) [@rok\_cesnovar](https://discourse.mc-stan.org/u/rok_cesnovar)\
**Post date:** [December 14, 2020, 4:00pm UTC](https://discourse.mc-stan.org/t/versioning-after-release/19803/1 "2020-12-14T16:00:32Z")

</div>

[A recent PR](https://github.com/stan-dev/stan/pull/2990) in `stan-dev/stan` has proposed that we bump the minor version on develop branches in Stan. I think this is a good idea as we want to distinguish that a develop branch is newer than a release. I thus feel we should do this in Math and Cmdstan as well. I am just no sure on how to number.

Our current policy is that we bump the minor version on release (for example to 2.25.0) and it stays that way until the next release. If there is a patch release we bump the patch number and that is all.

So the questions is to what do we set the package version after a release. R package use 2.25.0.9000 or something like that, but we dont have the fourth level in the version.

Should we do

a) 2.25.9000  
b) 2.25.999  
c) add the fourth level so its 2.25.0.9000  
d) leave it as is.

Tagging a few devs that might have an opinion here, but anyone is welcome to chime in as usual.

cc: @bbbales2 @syclik @avehtari @mitzimorris @jonah @ariddell @ahartikainen

---

<div class="post-metadata">

**Author:** ![bbbales2](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/bbbales2/32/77_2.png) [@bbbales2](https://discourse.mc-stan.org/u/bbbales2)\
**Post date:** [December 14, 2020, 4:25pm UTC](https://discourse.mc-stan.org/t/versioning-after-release/19803/2 "2020-12-14T16:25:28Z")

</div>

Should we be 2.25.0 in develop?

Would bumping to 2.25.1 be good enough? The problem here isn’t quite that Stan changed, but something about stanc2 and stanc3.

---

<div class="post-metadata">

**Author:** ![rok\_cesnovar](https://avatars.discourse-cdn.com/v4/letter/r/7bcc69/32.png) [@rok\_cesnovar](https://discourse.mc-stan.org/u/rok_cesnovar)\
**Post date:** [December 14, 2020, 4:31pm UTC](https://discourse.mc-stan.org/t/versioning-after-release/19803/3 "2020-12-14T16:31:45Z")

</div>

> [@bbbales2](#):
>
> Should we be 2.25.0 in develop?

I would say no which is why I opened this discussion.

I mean this in general, not just the changes this time. Anything could change, Math/Stan/Cmdstan/Stanc3.

---

<div class="post-metadata">

**Author:** ![rok\_cesnovar](https://avatars.discourse-cdn.com/v4/letter/r/7bcc69/32.png) [@rok\_cesnovar](https://discourse.mc-stan.org/u/rok_cesnovar)\
**Post date:** [December 14, 2020, 4:39pm UTC](https://discourse.mc-stan.org/t/versioning-after-release/19803/4 "2020-12-14T16:39:01Z")

</div>

Another idea is to have  
PROJECT\_DEVELOPMENT\_VERSION version in addition to PROJECT\_VERSION.

---

<div class="post-metadata">

**Author:** ![bbbales2](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/bbbales2/32/77_2.png) [@bbbales2](https://discourse.mc-stan.org/u/bbbales2)\
**Post date:** [December 14, 2020, 4:40pm UTC](https://discourse.mc-stan.org/t/versioning-after-release/19803/5 "2020-12-14T16:40:48Z")

</div>

Oh did stan-dev/stan not get a 2.25 release?

---

<div class="post-metadata">

**Author:** ![rok\_cesnovar](https://avatars.discourse-cdn.com/v4/letter/r/7bcc69/32.png) [@rok\_cesnovar](https://discourse.mc-stan.org/u/rok_cesnovar)\
**Post date:** [December 14, 2020, 4:43pm UTC](https://discourse.mc-stan.org/t/versioning-after-release/19803/6 "2020-12-14T16:43:07Z")

</div>

It did, but it seems that the version makefile variable was not updated. But that is a separate problem. @hsbadr has taken care of that.

It just reminded me that we should somehow note that develop \> last release.

---

<div class="post-metadata">

**Author:** ![hsbadr](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/hsbadr/32/15069_2.png) [@hsbadr](https://discourse.mc-stan.org/u/hsbadr)\
**Post date:** [December 14, 2020, 4:45pm UTC](https://discourse.mc-stan.org/t/versioning-after-release/19803/7 "2020-12-14T16:45:47Z")

</div>

I’d argue that the development version should be consistent with the convention/policy for the releases, meaning that if there’s a major change (new features or API changes), the major number gets bumped building on the last release (same for the minor and patch numbers). But, since the patch number would be moving quickly, the development version should keep it at the maximum value (typically, 3 digits = 999). This is exactly what I proposed [here](https://github.com/stan-dev/stan/pull/2990).

---

<div class="post-metadata">

**Author:** ![rok\_cesnovar](https://avatars.discourse-cdn.com/v4/letter/r/7bcc69/32.png) [@rok\_cesnovar](https://discourse.mc-stan.org/u/rok_cesnovar)\
**Post date:** [December 14, 2020, 4:54pm UTC](https://discourse.mc-stan.org/t/versioning-after-release/19803/8 "2020-12-14T16:54:06Z")

</div>

> [@hsbadr](#):
>
> But, since the patch number would be moving quickly, the development version should keep it at the maximum value (typically, 3 digits = 999). This is exactly what I proposed [here](https://github.com/stan-dev/stan/pull/2990).

I like that thinking.

Maybe we should just do that? Lets wait a few days to see if anyone disagrees.

---

<div class="post-metadata">

**Author:** ![bbbales2](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/bbbales2/32/77_2.png) [@bbbales2](https://discourse.mc-stan.org/u/bbbales2)\
**Post date:** [December 14, 2020, 5:09pm UTC](https://discourse.mc-stan.org/t/versioning-after-release/19803/9 "2020-12-14T17:09:07Z")

</div>

Or should we be bumping the patch version with pull requests?

Sticking it at 999 in develop seems strange cuz you could have something 2.25.999 older than 2.25.1, for instance

---

<div class="post-metadata">

**Author:** ![rok\_cesnovar](https://avatars.discourse-cdn.com/v4/letter/r/7bcc69/32.png) [@rok\_cesnovar](https://discourse.mc-stan.org/u/rok_cesnovar)\
**Post date:** [December 14, 2020, 5:12pm UTC](https://discourse.mc-stan.org/t/versioning-after-release/19803/10 "2020-12-14T17:12:31Z")

</div>

> [@bbbales2](#):
>
> Or should we be bumping the patch version with pull requests?

That is a hassle and a magnet for conflicts.

---

<div class="post-metadata">

**Author:** ![bbbales2](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/bbbales2/32/77_2.png) [@bbbales2](https://discourse.mc-stan.org/u/bbbales2)\
**Post date:** [December 14, 2020, 5:16pm UTC](https://discourse.mc-stan.org/t/versioning-after-release/19803/11 "2020-12-14T17:16:56Z")

</div>

True and I don’t like it for that reason.

> [@rok\_cesnovar](#):
>
> It just reminded me that we should somehow note that develop \> last release.

We could bump twice at release, once for the release number, and once for the new develop.

---

<div class="post-metadata">

**Author:** ![rok\_cesnovar](https://avatars.discourse-cdn.com/v4/letter/r/7bcc69/32.png) [@rok\_cesnovar](https://discourse.mc-stan.org/u/rok_cesnovar)\
**Post date:** [December 14, 2020, 5:19pm UTC](https://discourse.mc-stan.org/t/versioning-after-release/19803/12 "2020-12-14T17:19:45Z")

</div>

> [@bbbales2](#):
>
> We could bump twice at release, once for the release number, and once for the new develop.

Yes, I think that would be the best. The question is to what number do we bump after the release? 2.x+1.0

---

<div class="post-metadata">

**Author:** ![bbbales2](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/bbbales2/32/77_2.png) [@bbbales2](https://discourse.mc-stan.org/u/bbbales2)\
**Post date:** [December 14, 2020, 5:27pm UTC](https://discourse.mc-stan.org/t/versioning-after-release/19803/13 "2020-12-14T17:27:54Z")

</div>

> [@rok\_cesnovar](#):
>
> The question is to what number do we bump after the release? 2.x+1.0

Bumping the minor number seems good.

---

<div class="post-metadata">

**Author:** ![hsbadr](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/hsbadr/32/15069_2.png) [@hsbadr](https://discourse.mc-stan.org/u/hsbadr)\
**Post date:** [December 14, 2020, 5:40pm UTC](https://discourse.mc-stan.org/t/versioning-after-release/19803/14 "2020-12-14T17:40:51Z")

</div>

Do you mean that the current development version should be v2.26.0? With a new release, it doesn’t make sense that the minor numbers diverge with no changes in the source code, but the max patch number of 999 will always indicate that it’s a development version. The major and minor numbers can only be bumped with relevant changes. So, if the development branch has merged minor changes from the stable release v2.25.0, the development version will be v2.26.999… and so on.

The X.Y.999 indication of a development version is important too, when referring to a user issue for example (minor versions can get mixed unless you keep track of them).

Also, think about release candidates! It’d be confusing to bump the minor version when the last version hasn’t been released yet.

---

<div class="post-metadata">

**Author:** ![hsbadr](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/hsbadr/32/15069_2.png) [@hsbadr](https://discourse.mc-stan.org/u/hsbadr)\
**Post date:** [December 14, 2020, 5:59pm UTC](https://discourse.mc-stan.org/t/versioning-after-release/19803/15 "2020-12-14T17:59:11Z")

</div>

Another option is to automatically append the last commit hash to the version, something like **2.25.0-30c9419** and remove it for the releases.

---

<div class="post-metadata">

**Author:** ![rok\_cesnovar](https://avatars.discourse-cdn.com/v4/letter/r/7bcc69/32.png) [@rok\_cesnovar](https://discourse.mc-stan.org/u/rok_cesnovar)\
**Post date:** [December 14, 2020, 6:02pm UTC](https://discourse.mc-stan.org/t/versioning-after-release/19803/16 "2020-12-14T18:02:17Z")

</div>

I think going with 2.25.9999 might be the simplest solution here.

We are not going to have ever have 10k patch releases when this becomes a problem.

If we have to do a patch release we change to 2.25.1 and then move back to .9999.

---

<div class="post-metadata">

**Author:** ![hsbadr](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/hsbadr/32/15069_2.png) [@hsbadr](https://discourse.mc-stan.org/u/hsbadr)\
**Post date:** [December 14, 2020, 6:03pm UTC](https://discourse.mc-stan.org/t/versioning-after-release/19803/17 "2020-12-14T18:03:54Z")

</div>

Sounds good to me. I can add another patch digit if everyone agrees.

---

<div class="post-metadata">

**Author:** ![jonah](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/jonah/32/200_2.png) [@jonah](https://discourse.mc-stan.org/u/jonah)\
**Post date:** [December 14, 2020, 6:56pm UTC](https://discourse.mc-stan.org/t/versioning-after-release/19803/18 "2020-12-14T18:56:39Z")

</div>

I think this is a good idea.

For the R packages, like @rok_cesnovar mentioned, we would do 2.25.0.9000 and I think that’s pretty common in R because it’s recommended in Hadley’s R packages book (if I recall correctly). Here’s the current DESCRIPTION file for bayesplot, which has version 1.7.2.9000:

> <https://github.com/stan-dev/bayesplot/blob/cb1b403c4fd46cbcc28564970cb88c35486001fa/DESCRIPTION#L4>

> [@rok\_cesnovar](#):
>
> I think going with 2.25.9999 might be the simplest solution here.

Yeah that makes sense.

---

<div class="post-metadata">

**Author:** ![hsbadr](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/hsbadr/32/15069_2.png) [@hsbadr](https://discourse.mc-stan.org/u/hsbadr)\
**Post date:** [December 14, 2020, 7:22pm UTC](https://discourse.mc-stan.org/t/versioning-after-release/19803/19 "2020-12-14T19:22:34Z")

</div>

Agreed. It’s common in R _tidymodels_, _tidyverse_, and _RStudio_ in general to see **X.Y.Z.9000** for the development version. Do you prefer **2.25.9999** or **2.25.0.9000**?

---

<div class="post-metadata">

**Author:** ![jonah](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/jonah/32/200_2.png) [@jonah](https://discourse.mc-stan.org/u/jonah)\
**Post date:** [December 14, 2020, 7:28pm UTC](https://discourse.mc-stan.org/t/versioning-after-release/19803/20 "2020-12-14T19:28:34Z")

</div>

> [@hsbadr](#):
>
> Do you prefer **2.25.9999** or **2.25.0.9000**?

No strong preference. I’d be fine with either of those for Stan.

[Next page](https://discourse.mc-stan.org/t/versioning-after-release/19803.md?page=2)
