# Discussion on the major release cycle of the Scala Platform

**URL:** <https://contributors.scala-lang.org/t/discussion-on-the-major-release-cycle-of-the-scala-platform/202>\
**Category:** Scala Platform\
**Created:** [December 3, 2016, 11:01pm UTC](https://contributors.scala-lang.org/t/discussion-on-the-major-release-cycle-of-the-scala-platform/202 "2016-12-03T23:01:59Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![jvican](https://contributors.scala-lang.org/user_avatar/contributors.scala-lang.org/jvican/32/1958_2.png) [@jvican](https://contributors.scala-lang.org/u/jvican)\
**Post date:** [December 3, 2016, 11:01pm UTC](https://contributors.scala-lang.org/t/discussion-on-the-major-release-cycle-of-the-scala-platform/202/1 "2016-12-03T23:01:59Z")

</div>

The full details of the Scala Platform release process can be found [here](https://scalacenter.github.io/platform-staging/policies.html#policies-on-release-and-stability).

To align with one of the major goals of the Platform (stability), we propose a conservative release cycle that allows libraries to ship breaking changes every 18 months (1 year and six months). The rationale behind this decision is that potential modules shall be widely used, and therefore they are supposed to be well-tested and stable. If this is not the case, maintainers can make their changes in the incubation period, before a stable release.

However, I’m not sure if everyone is in favor of this policy and would like to hear other people’s opinion. It’s true that the breaking release process is long, so maybe reducing it to 12 months would work. However, this would imply that users need to go through a (hopefully not) painful migration process. This is not very user-friendly, unfortunately.

If this ends up being the case, however, the Scala Platform infrastructure could help providing tools that migrate (some, potentially all) breaking libraries’ API. I believe this would be a key tool for the Community, be it used in this situation or not. Other platforms could also benefit from them. However, this requires time and it’s not easy to get right. It might be better to allow breaking changes every 18 months if this is not a major issue for library authors.

What is reasonable for you? Would this be an impediment for you and other library authors?

---

<div class="post-metadata">

**Author:** ![ShaneDelmore](https://contributors.scala-lang.org/user_avatar/contributors.scala-lang.org/shanedelmore/32/855_2.png) [@ShaneDelmore](https://contributors.scala-lang.org/u/ShaneDelmore)\
**Post date:** [December 4, 2016, 2:44am UTC](https://contributors.scala-lang.org/t/discussion-on-the-major-release-cycle-of-the-scala-platform/202/2 "2016-12-04T02:44:09Z")

</div>

What counts as a breaking change? Is it any change that will no longer compile, or any change for which there is no automated upgrade path? I could see being more aggressive with updates if migrators were supplied with the updates using something like Scala-Fix.

---

<div class="post-metadata">

**Author:** ![jvican](https://contributors.scala-lang.org/user_avatar/contributors.scala-lang.org/jvican/32/1958_2.png) [@jvican](https://contributors.scala-lang.org/u/jvican)\
**Post date:** [December 4, 2016, 12:32pm UTC](https://contributors.scala-lang.org/t/discussion-on-the-major-release-cycle-of-the-scala-platform/202/3 "2016-12-04T12:32:47Z")

</div>

From the process:

> Modules can only break backwards compatibility in major releases, that happen: (a) every 18 months (1 year and 6 months), or (b) when new Scala versions are released.

The automatic library migration tool is an neat idea to consider, but I’m not clear how viable it is and whether it’s worth the effort. We cannot rely on their existence at this moment, IMO.

The Scala Platform process uses semantic versioning. Semantic versioning allows you to bump up the major version number if you’ve done any incompatible changes both at the source and binary level (and backwards or forwards). There would be no distinction between forwards and backwards as there is in the Scala compiler release process (I don’t see a lot of value in distinguish them, at least; does anyone have a good example where this would be meaningful for users of the Platform?).

> [@ShaneDelmore](#):
>
> if migrators were supplied with the updates using something like Scala-Fix.

It’s unclear at this moment what Scalafix will be able to do, but from the official proposal submitted to the Advisory Board it’s meant to focus on Scala → Dotty migration.

---

<div class="post-metadata">

**Author:** ![jducoeur](https://contributors.scala-lang.org/user_avatar/contributors.scala-lang.org/jducoeur/32/32_2.png) [@jducoeur](https://contributors.scala-lang.org/u/jducoeur)\
**Post date:** [December 4, 2016, 4:37pm UTC](https://contributors.scala-lang.org/t/discussion-on-the-major-release-cycle-of-the-scala-platform/202/4 "2016-12-04T16:37:06Z")

</div>

Feels a _tad_ coarse-grained to me – for a Platform-wide clock with so many inputs I’d probably say 12 months instead of 18, aligned to some agreed month. That’s still slow enough to not be a huge deal for us application developers, while not putting _too_ much sand in the gears of the library authors. 12 months is a long time in modern software development, especially for libraries; I don’t see a compelling need to push it all the way out to 18.

---

<div class="post-metadata">

**Author:** ![Ichoran](https://contributors.scala-lang.org/user_avatar/contributors.scala-lang.org/ichoran/32/40_2.png) [@Ichoran](https://contributors.scala-lang.org/u/Ichoran)\
**Post date:** [December 4, 2016, 7:42pm UTC](https://contributors.scala-lang.org/t/discussion-on-the-major-release-cycle-of-the-scala-platform/202/5 "2016-12-04T19:42:11Z")

</div>

I think the per-platform frequency should be allowed to be relatively high (12 months seems fine to me), but the per _module_ frequency should not, especially if there are many breaking changes. Adopting the Scala Platform shouldn’t commit you to a serious rewrite of your code every 12 months. That’s just too much work. In practice few libraries have that much churn (especially widely used ones), but it is a good idea I think to make that an expectation: breaking changes are aligned on a single release cycle that occurs once every 12ish months (maybe we could just say 1 in 4 if we have a 12 week release cycle), but that a single module will NOT be breaking more than a very minimal amount of stuff repeatedly year after year.

---

<div class="post-metadata">

**Author:** ![sjrd](https://contributors.scala-lang.org/user_avatar/contributors.scala-lang.org/sjrd/32/24_2.png) [@sjrd](https://contributors.scala-lang.org/u/sjrd)\
**Post date:** [December 4, 2016, 8:14pm UTC](https://contributors.scala-lang.org/t/discussion-on-the-major-release-cycle-of-the-scala-platform/202/6 "2016-12-04T20:14:27Z")

</div>

> [@jvican](#):
>
> There would be no distinction between forwards and backwards as there is in the Scala compiler release process (I don’t see a lot of value in distinguish them, at least; does anyone have a good example where this would be meaningful for users of the Platform?).

I understand this the other way around. To me, the Scala compiler/stdlib release process fuses backward and forward binary compat, since a breakage in any direction is considered a breakage. I think libraries _should_ distinguish those things. Breaking forward binary compat shouldn’t be a concern for libraries. It’s breaking _backwards_ source and/or binary compatibility which is bad.

My take on this is that a major version bump is required iff backward source and/or binary compatibility is broken. Concretely this means adding a method is fine in a minor release; removing a method requires a major release.

There are a lot of details to consider beyond this simple distinction, though:

- When we deprecate a method, we can break backward source compatibility for codebases with `-Xfatal-warnings`. IMO this should not force a semver major bump. We could demand a semver minor bump for this case.
- In theory, in Scala, even _adding_ a method to a final class can be backward _source_ incompatible, for codebases which previously pimped that method via an implicit (with potentially a different contract). It cannot break backward binary compatibility, however. I would recommend that this scenario require a sever _minor_ bump.

IMO a bump in the semver _release_ number should guarantee full backward source and binary compat. A semver _minor_ update should guarantee 100% backward _binary_ compat, and reasonable _source_ compat (by “reasonable”, I mean excluding the corner cases identified above, and potentially others I have not thought about right now).

---

<div class="post-metadata">

**Author:** ![Alefas](https://contributors.scala-lang.org/user_avatar/contributors.scala-lang.org/alefas/32/49_2.png) [@Alefas](https://contributors.scala-lang.org/u/Alefas)\
**Post date:** [December 5, 2016, 8:30am UTC](https://contributors.scala-lang.org/t/discussion-on-the-major-release-cycle-of-the-scala-platform/202/7 "2016-12-05T08:30:14Z")

</div>

We are slowly working on automatic library update process in IntelliJ IDEA. It’s already possible to use (we also implemented SAM migration for Scala 2.11 -\> 2.12), but it’s still quite experimental, I think it will be completely finished during 2017.

---

<div class="post-metadata">

**Author:** ![Blaisorblade](https://contributors.scala-lang.org/user_avatar/contributors.scala-lang.org/blaisorblade/32/561_2.png) [@Blaisorblade](https://contributors.scala-lang.org/u/Blaisorblade)\
**Post date:** [December 8, 2016, 10:29am UTC](https://contributors.scala-lang.org/t/discussion-on-the-major-release-cycle-of-the-scala-platform/202/8 "2016-12-08T10:29:14Z")

</div>

I like that you start listing details.

> Concretely this means adding a method is fine in a minor release; removing a method requires a major release.

> In theory, in Scala, even adding a method to a final class can be backward source incompatible, for codebases which previously pimped that method via an implicit (with potentially a different contract).

Why just final classes? The same applies to non-final ones, so the impact seems wider.

Also, why only “in theory”? If perfect source-compatibility isn’t to be expected (which is probably correct), say because it’s not enforced, that should be explicit.

Skimming at both the Haskell PVP ([http://pvp.haskell.org/](http://pvp.haskell.org/), for source compatibility) and what the JLS says on binary compatibility:

> [Chapter&nbsp;13.&nbsp;Binary Compatibility](https://docs.oracle.com/javase/specs/jls/se7/html/jls-13.html)

a full discussion of compatible changes is probably longer.

We probably don’t need source compatibility to be as perfect as the Haskell PVP demands (in the world of Haskell PVP, supposedly source-compatible dependencies can be picked when packages are installed, so _users_ see the build failures), but if guarantees are best-effort that should be explicit.

---

<div class="post-metadata">

**Author:** ![mdedetrich](https://contributors.scala-lang.org/user_avatar/contributors.scala-lang.org/mdedetrich/32/566_2.png) [@mdedetrich](https://contributors.scala-lang.org/u/mdedetrich)\
**Post date:** [December 8, 2016, 11:24am UTC](https://contributors.scala-lang.org/t/discussion-on-the-major-release-cycle-of-the-scala-platform/202/9 "2016-12-08T11:24:40Z")

</div>

Can we clarify if we are talking about source compatibility or binary compatibility? There is a world of difference between the two (and I would rather opt for source compatibility for a 12 month duration, if possible).

---

<div class="post-metadata">

**Author:** ![ktoso](https://contributors.scala-lang.org/user_avatar/contributors.scala-lang.org/ktoso/32/11_2.png) [@ktoso](https://contributors.scala-lang.org/u/ktoso)\
**Post date:** [December 8, 2016, 11:38am UTC](https://contributors.scala-lang.org/t/discussion-on-the-major-release-cycle-of-the-scala-platform/202/10 "2016-12-08T11:38:15Z")

</div>

Source compatibility is not really helpful for people building libraries on top of your libraries though.  
Since the platform is means to be “core” and “used by many libraries / projects” it should aim for binary compatibility.

It’s possible to pull off, you simply deprecate and add new APIs - we’ve been keeping binary stability in Akka since 2.3 (March 2014!), and it is a _feature_ to be stable and remain so for libraries as core as these.

---

<div class="post-metadata">

**Author:** ![sjrd](https://contributors.scala-lang.org/user_avatar/contributors.scala-lang.org/sjrd/32/24_2.png) [@sjrd](https://contributors.scala-lang.org/u/sjrd)\
**Post date:** [December 8, 2016, 2:36pm UTC](https://contributors.scala-lang.org/t/discussion-on-the-major-release-cycle-of-the-scala-platform/202/11 "2016-12-08T14:36:10Z")

</div>

> [@](#):
>
> Why just final classes? The same applies to non-final ones, so the impact seems wider.

Absolutely! It’s just that in a non-final class it’s not as surprising because a def in a subclass could need an `override`. Of course any problem in final classes is also a problem in non-final classes.
