|
| 1 | +# Scala LTS maintenance and release cycle |
| 2 | + |
| 3 | +## Scala LTS and Scala Next |
| 4 | + |
| 5 | +Since Scala 3.3.0, there are always two versions of Scala 3 being developed at the same time: Scala Next and Scala LTS. |
| 6 | + |
| 7 | +Scala Next continues all practices since before the 3.3.0. It maintains backward output (TASTy and binary) compatibility between all versions and forward output compatibility between patch releases of the same minor version. This version is being actively developed on the `main` branch. All new bug fixes and features will be merged to that version, i.e., to the `main` branch. |
| 8 | + |
| 9 | +Scala LTS is a selected minor version (currently 3.3) that, unlike all other minor versions, has patch releases even though there is a newer minor version. Aside from our standard output compatibility guarantees, it is intended to preserve backward source compatibility. As no new features and bugfixes (with the rare exception of LTS-only hotfixes) will be developed for LTS, but instead, selected changes from the Next branch will be backported, there is no development branch for Scala LTS. All changes are merged to release branches instead. The commit marked with a full release tag for any version is the base for the release branch for the next version. |
| 10 | + |
| 11 | +## What should be backported? |
| 12 | + |
| 13 | +The decision of what changes merged to the `main` branch should be backported is taken according to the following flowchart: |
| 14 | + |
| 15 | +```mermaid |
| 16 | +flowchart TB |
| 17 | + start(["PR relevant for LTS was merged to main branch"]) |
| 18 | + --> |
| 19 | + cve{"Is this |
| 20 | + a fix for a CVE?"} |
| 21 | + -- yes --> ocb |
| 22 | +
|
| 23 | + subgraph "CVE" |
| 24 | + ocb{"Does it cause |
| 25 | + any new failures |
| 26 | + in the full CB?"} |
| 27 | +
|
| 28 | + -- yes --> |
| 29 | + regFix[\"Try to provide |
| 30 | + a followup fix for |
| 31 | + a regressions"/] |
| 32 | +
|
| 33 | + -- failure --> |
| 34 | + debate[\"Possible workarounds |
| 35 | + for new regressions are discussed |
| 36 | + by the compiler team"/] |
| 37 | +
|
| 38 | + regFix -- success --> ocb |
| 39 | + end |
| 40 | + ocb -- no --> acc |
| 41 | + debate -->|"decision on |
| 42 | + the recommended |
| 43 | + workarounds"| acc |
| 44 | +
|
| 45 | + cve -- no --> |
| 46 | + incompat{"Does the fix |
| 47 | + break forward |
| 48 | + compatibiliy?"} |
| 49 | + -- yes --> reject |
| 50 | +
|
| 51 | + incompat -- no --> |
| 52 | +
|
| 53 | + regression{"Is this a fix for |
| 54 | + a regression present |
| 55 | + also in LTS?"} |
| 56 | + -- yes --> |
| 57 | +
|
| 58 | + regIsLTS{"Was the last version |
| 59 | + not affected by |
| 60 | + the regression released |
| 61 | + before 3.3.0?"} |
| 62 | + -- no --> ocbReg |
| 63 | +
|
| 64 | + subgraph "LTS Regression" |
| 65 | + ocbReg{"Does it cause |
| 66 | + any new failures |
| 67 | + in the full CB?"} |
| 68 | +
|
| 69 | + -- yes --> |
| 70 | + regFixReg[\"Try to provide |
| 71 | + a followup fix for |
| 72 | + a regressions"/] |
| 73 | +
|
| 74 | + -- failure --> |
| 75 | + debateReg[\"Impact of both new and old regression |
| 76 | + and possible workarounds |
| 77 | + are discussed by the compiler team."/] |
| 78 | +
|
| 79 | + regFixReg -- success --> ocbReg |
| 80 | + end |
| 81 | + ocbReg -- no --> acc |
| 82 | + debateReg -->|"decision on |
| 83 | + the recommended |
| 84 | + workarounds for |
| 85 | + the new regression"| acc |
| 86 | + debateReg -->|"decision on |
| 87 | + the recommended |
| 88 | + workarounds for |
| 89 | + the old regression"| reject |
| 90 | +
|
| 91 | + regression -- no --> types |
| 92 | + regIsLTS -- yes --> types |
| 93 | + types{"Can the fix |
| 94 | + change types |
| 95 | + in any correct |
| 96 | + Scala 3 code?"} |
| 97 | + -- yes --> request |
| 98 | + types -- no --> ocbOther |
| 99 | +
|
| 100 | + request{"Is backport |
| 101 | + of the fix |
| 102 | + heavily requested?"} |
| 103 | + -- yes --> debateReq |
| 104 | + request -- no --> reject |
| 105 | +
|
| 106 | + debateReq[\"Possibility of |
| 107 | + the backport is discussed |
| 108 | + by the compiler team"/] |
| 109 | + --> |"backport is rejected"| reject |
| 110 | + debateReq --> |"backport is accepted"| ocbOther |
| 111 | +
|
| 112 | + subgraph "Other Fixes" |
| 113 | + ocbOther{"Does it cause |
| 114 | + any new failures |
| 115 | + in the full CB?"} |
| 116 | +
|
| 117 | + -- yes --> |
| 118 | + regFixOther[\"Try to provide |
| 119 | + a followup fix for |
| 120 | + a regressions"/] |
| 121 | + -- success --> ocbOther |
| 122 | +
|
| 123 | + ocbOther -- no --> |
| 124 | + lint{"Does it introduce |
| 125 | + any new warnings |
| 126 | + behind flags?"} |
| 127 | + -- yes --> |
| 128 | + lintOcb{"Does it cause any |
| 129 | + new failures in the full CB |
| 130 | + after forcing a new flag?"} |
| 131 | + -- yes --> regFixOther |
| 132 | + end |
| 133 | +
|
| 134 | + lint -- no --> acc |
| 135 | + lintOcb -- no --> acc |
| 136 | + regFixOther -- failure --> reject |
| 137 | +
|
| 138 | + acc(["The PR is backported"]) |
| 139 | + reject(["The PR is not backported"]) |
| 140 | +
|
| 141 | +
|
| 142 | +
|
| 143 | +
|
| 144 | +
|
| 145 | +
|
| 146 | +``` |
| 147 | + |
| 148 | +## How should things be backported? |
| 149 | + |
| 150 | +The backporting process is tracked by a GitHub Project in the lampepfl organization. Every PR merged to the `main` branch is automatically added to the `Needs Assessment` column. Those PRs are reviewed by the release officer or other appointed person. They can decide to remove them from the project (backport rejected) or to move them to the `Backporting in progress` column. If the PR with the backport has any differences from the original PR, the person doing the backport will ask the author and reviewers of the original change to review the backport. After merging the backport, the PR will be moved to the `Backport done` column and, after the release, to the `Released` column. |
| 151 | + |
| 152 | +Maintainers can request backporting the entirety or a part of previously rejected PR by adding it to the `Backport requested` column. |
| 153 | + |
| 154 | +## The release cycle |
| 155 | + |
| 156 | +Releasing two different lines of the language at the same time requires some changes to the release procedures. We no longer release RC versions for patch releases of Scala Next. RC versions of patch releases of Scala LTS are released two weeks before the intended full release date. RC versions of Scala Next minor releases are released four weeks before the intended full release date. |
| 157 | + |
| 158 | +The releases will be performed according to the 6-week cycles. Actions of each week are started to be performed on Tuesday. This is because the compiler team meetings take place on Mondays, and some concerns might be raised during them. |
| 159 | + |
| 160 | +If we assume that the cycle starts on Tuesday `t` and `t + 1` is the next Tuesday, the timeline looks as follows: |
| 161 | + |
| 162 | +- `t` - release of Scala Next and RC1 for the next Scala LTS patch. |
| 163 | +- `t + 2` - release of the next Scala LTS patch. If the next Scala Next version is a minor version, RC1 of that version is released. |
| 164 | +- `t + 6` - the start of the new release cycle |
| 165 | + |
| 166 | +### Dealing with delays |
| 167 | + |
| 168 | +It is possible that there will be problems in the RC releases that require fixes and further release candidates. We will not publish a full release in the same week as an RC. This means that delay can occur. |
| 169 | + |
| 170 | +In the case of LTS releases, there are four weeks to fix the problem if the versions is to be released before the RC1 of the next patch. If we don't solve the issue two weeks before the start of the next release cycle, we will find a commit on the release branch of the current version that the problem was not yet present and release it as an RC. Before releasing the RC1 for the next version, we will either find a fix for the problem or rebase the next release branch so that the offending change is removed from the branch. |
| 171 | + |
| 172 | +In the case of minor Scala Next releases, if we cannot have a satisfying RC on time, we can skip releasing the stable Scala Next version in the given release cycle. This means there may be cycles during which we release only Scala LTS. |
| 173 | + |
| 174 | +Accounting for delays adds these points to the timeline above: |
| 175 | + |
| 176 | +- `t + 4` - last possible moment to release RC for the Scala LTS patch, which is trying to fix a problem |
| 177 | +- `t + 5` - If no RC exists for Scala LTS fixing a problem, a version based on the last non-problematic commit is released. Also, this is the last moment to release RC for the Scala Next minor. Otherwise, we will skip the Scala Next release in the next cycle. |
| 178 | + |
| 179 | +### What is being released? |
| 180 | + |
| 181 | +For the Scala LTS, what is released as an RC is always the current head of the release branch for the next release. |
| 182 | + |
| 183 | +For the Scala Next minor releases RC, it is the head of the `main` branch. |
| 184 | + |
| 185 | +For the Scala Next patches, there are no RCs. As a point of cut-off of the release, we are choosing one relatively recent commit from the `main` branch on which a full Open Community Build was run before the decision. The default choice here is the commit on which the last weekly community build was run. |
0 commit comments