Skip to content

Proposal for change to Cats 2.0 plan #2938

@kailuowang

Description

@kailuowang

UPDATE: Closed for now to be replace with a revised draft incorporating feedbacks.

@LukaJCB and I would like to propose a new plan for Cats major version release. We think this plan will ease our future evolution pain/anxiety, bring high value features sooner without negative impact on the user side.

Cats is in a similar situation as Scala stdlib as that it's relatively stable now and widely used by the ecosystem and thus must remain binary compatible for extended period. Scala stdlib, as well as the Scala lang, gradually evolves with breaking changes thanks to the cross releasing machinery (i.e. the Scala version suffix of library artifact names) in the Scala ecosystem. By aligning Cats' breaking change release cycle with the Scala release cycle, Cats-core can evolve with breaking changes this way as well.
By "aligning", We mean specifically:

  1. timing alignment
  2. All cats-core releases for a certain Scala major version guarantee to be BC
  3. Introduce BC-breaking changes only for a new Scala major version.

More concretely speaking, we propose that Cats 2.0 be aligned with Scala 2.13, with all the would-be-breaking changes only on cats-core_2.13. "Would-be-breaking" because there is no previous 2.13 release to be breaking with. cats-core_2.12 (regardless of which Cats major version it is) remains binary compatible (until we drop support for Scala 2.12). Cats 3.0 will be aligned with Scala 2.14 in the same fashion, Cats 4.0 with Scala 3.0, etc.

Like Scala std lib, to maintain multiple incompatible major versions, we'll need multiple parallel source trees. In the meantime we'll try maintain source compatibility across different Scala versions Cats source. To ensure this, we will maintain multiple scala version specific Cats source trees in a single branch but in different source folders, while having our tests cross build. It should be fine if we change our mind and switch to use git branch based parallel source trees later.

In regards to the incoming 2.0 release, we have [a list of things]((https://github.com/typelevel/cats/milestones/3.0) that we originally scheduled for 3.0. We want to take this opportunity to move some of them to 2.0 release on 2.13 source tree. (On the other hand if we miss this time window, it will have to wait until Scala 2.14.)
The criteria for selecting items to move is:

  1. High value
  2. The API of which has been stable
  3. Source compatible and thus cross build friendly to users

One of such high value items would be new type based zero cost monad transformers. Another important factor here is that **there are few applications running Scala 2.13 on production at the time, this should give us some time to test and fix the potential issues brought by these 2.13 only changes.

We estimate the effort to likely take 2-3 weeks, maybe quicker if we can recruit some contributors to parallelize it.

There are two separate decisions in this proposal:

  1. Shall we align our breaking change release cycle as Scala major version and evolve likewise taking advantage of the Scala version suffix based release machinery. The alternative will be a breaking Cats release somewhere in the middle of the Scala major version circle and force the whole ecosystem to upgrade (probably under a different root package name as well as publishing org to avoid conflicts)
  2. Shall we start this on Cats 2.0 and spend a couple of weeks to roll in some of the high value Cats 3.0 items.

We need to move quickly as the ecosystem is waiting on Cats 2.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions