Skip to content

Drop support for Scala 2.12.{2-5}. #5095

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 31, 2024

Conversation

sjrd
Copy link
Member

@sjrd sjrd commented Dec 29, 2024

These were the 2.12.x versions for which we still had some custom code paths, workarounds or exceptions lying around.

Scala 2.12.2 and 2.12.3 exhibited compiler crashes on recent changes in the linker, which triggered this decision.


According to nightly builds, something in #5092 or #5088 started causing compiler crashes with Scala 2.12.2 and Scala 2.12.3. I've been thinking about getting rid of versions <= 2.12.5 for a while, and these recent crashes pushed me to actually make a PR. The crashes were

[error] (linker2_12 / Compile / compileIncremental) scala.reflect.internal.FatalError: 
[error]   unrecoverable error
[error]      while compiling: linker/shared/src/main/scala/org/scalajs/linker/backend/emitter/FunctionEmitter.scala
[error]         during phase: globalPhase=erasure, enteringPhase=posterasure
[error]      library version: version 2.12.2
[error]     compiler version: version 2.12.2
[error]   reconstructed args: -encoding utf8 -deprecation -feature -Xfatal-warnings -classpath ...
[error] 
[error]   last tree to typer: TypeTree(class Tree)
[error]        tree position: line 1496 of linker/shared/src/main/scala/org/scalajs/linker/backend/emitter/FunctionEmitter.scala
[error]             tree tpe: org.scalajs.linker.backend.javascript.Trees.Tree
[error]               symbol: (sealed abstract) class Tree in object Trees
[error]    symbol definition: sealed abstract class Tree extends Object (a ClassSymbol)
[error]       symbol package: org.scalajs.linker.backend.javascript
[error]        symbol owners: class Tree -> object Trees
[error]            call site: method extractRecordElems in class JSDesugar in package emitter
[error] 
[error] == Source file context for tree position ==
[error] 
[error]   1493             case SelectStatic(FieldIdent(field))
[error]   1494                 if moduleKind == ModuleKind.NoModule =>
[error]   1495               val mirrors = globalKnowledge.getStaticFieldMirrors(field)
[error]   1496               mirrors.foldLeft(base) { (prev, mirror) =>
[error]   1497                 js.Assign(genGlobalVarRef(mirror), prev)
[error]   1498               }
[error]   1499             case _ =>

These were the 2.12.x versions for which we still had some custom
code paths, workarounds or exceptions lying around.

Scala 2.12.2 and 2.12.3 exhibited compiler crashes on recent
changes in the linker, which triggered this decision.
@sjrd sjrd requested a review from gzm0 December 29, 2024 13:50
@sjrd
Copy link
Member Author

sjrd commented Dec 29, 2024

Full build for this PR: https://scala-webapps.epfl.ch/sjsjenkins/blue/organizations/jenkins/scalajs-main/detail/PR-5095/2/pipeline

@gzm0 gzm0 merged commit 17fc592 into scala-js:main Dec 31, 2024
3 checks passed
@sjrd sjrd deleted the drop-scala-2.12.5-and-below branch December 31, 2024 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants