Skip to content
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

Bump respective Scala versions to 2.12.17 & 2.13.9 and Ammonite to 2.5.4-33-0af04a5b #1405

Merged
merged 5 commits into from
Sep 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 2 additions & 17 deletions modules/cli/src/main/scala/scala/cli/commands/Repl.scala
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,7 @@ object Repl extends ScalaCommand[ReplOptions] {
def buildOptions(ops: ReplOptions): BuildOptions = {
import ops._
import ops.sharedRepl._
val ammoniteVersionOpt = ammoniteVersion.map(_.trim).filter(_.nonEmpty)

val logger = ops.shared.logger
val baseOptions = shared.copy(scalaVersion =
if (
ammonite.contains(true) &&
(shared.scalaVersion.isEmpty || shared.scalaVersion.contains("3.2.0")) &&
ammoniteVersionOpt.isEmpty
) {
// TODO remove this once ammonite adds support for 3.2.0
System.err.println("Scala 3.2.0 is not yet supported with this version of ammonite")
System.err.println("Defaulting to Scala 3.1.3")
Some("3.1.3")
}
else shared.scalaVersion
).buildOptions().orExit(logger)
val baseOptions = shared.buildOptions().orExit(ops.shared.logger)
baseOptions.copy(
javaOptions = baseOptions.javaOptions.copy(
javaOpts =
Expand All @@ -55,7 +40,7 @@ object Repl extends ScalaCommand[ReplOptions] {
notForBloopOptions = baseOptions.notForBloopOptions.copy(
replOptions = baseOptions.notForBloopOptions.replOptions.copy(
useAmmoniteOpt = ammonite,
ammoniteVersionOpt = ammoniteVersionOpt,
ammoniteVersionOpt = ammoniteVersion.map(_.trim).filter(_.nonEmpty),
ammoniteArgs = ammoniteArg
),
python = sharedPython.python,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,9 @@ abstract class ReplTestDefinitions(val scalaVersionOpt: Option[String])
}
}

// Temporarily filtering out 3.2.0, until com-lihaoyi/Ammonite#1286 is merged.
if (actualScalaVersion != "3.2.0")
test("ammonite") {
ammoniteTest()
}
test("ammonite") {
ammoniteTest()
}

test("ammonite scalapy") {
TestInputs.empty.fromRoot { root =>
Expand Down
6 changes: 3 additions & 3 deletions project/deps.sc
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import scala.util.Properties
import $file.utils, utils.isArmArchitecture

object Scala {
def scala212 = "2.12.16"
def scala213 = "2.13.8"
def scala212 = "2.12.17"
def scala213 = "2.13.9"
def runnerScala3 = "3.0.2" // the newest version that is compatible with all Scala 3.x versions
def scala3 = "3.2.0"
val allScala2 = Seq(scala213, scala212)
Expand Down Expand Up @@ -72,7 +72,7 @@ object Deps {
// DO NOT hardcode a Scala version in this dependency string
// This dependency is used to ensure that Ammonite is available for Scala versions
// that Scala CLI supports.
def ammonite = ivy"com.lihaoyi:::ammonite:2.5.4-22-4a9e6989"
def ammonite = ivy"com.lihaoyi:::ammonite:2.5.4-33-0af04a5b"
def asm = ivy"org.ow2.asm:asm:9.3"
// Force using of 2.13 - is there a better way?
def bloopConfig = ivy"io.github.alexarchambault.bleep:bloop-config_2.13:1.5.3-sc-1"
Expand Down
16 changes: 9 additions & 7 deletions website/docs/reference/scala-versions.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,17 @@ title: Supported scala versions
sidebar_position: 7
---

Currently, Scala CLI supports Scala 3, 2.13 and 2.12. The table below lists the last supported version of Scala in Scala CLI. If you want to use a newer Scala version,
Currently, Scala CLI supports Scala 3, 2.13 and 2.12. The table below lists the last supported version of Scala in Scala
CLI. If you want to use a newer Scala version,
it is recommended to update scala-cli.

| Scala CLI versions | Scala 3 | Scala 2.13 | Scala 2.12 |
|--------------------|:-------:|------------:|-----------:|
| 0.0.9 | 3.0.2 | 2.13.7 | 2.12.7 |
| 0.1.0 - 0.1.3 | 3.1.1 | 2.13.8 | 2.12.15 |
| 0.1.4 - 0.1.7 | 3.1.2 | 2.13.8 | 2.12.15 |
| 0.1.8 | 3.1.2 | 2.13.8 | 2.12.16 |
| 0.1.9 - 0.1.12 | 3.1.3 | 2.13.8 | 2.12.16 |
| 0.1.13 - current | 3.2.0 | 2.13.8 | 2.12.16 |
| 0.0.9 | 3.0.2 | 2.13.7 | 2.12.7 |
| 0.1.0 - 0.1.3 | 3.1.1 | 2.13.8 | 2.12.15 |
| 0.1.4 - 0.1.7 | 3.1.2 | 2.13.8 | 2.12.15 |
| 0.1.8 | 3.1.2 | 2.13.8 | 2.12.16 |
| 0.1.9 - 0.1.12 | 3.1.3 | 2.13.8 | 2.12.16 |
| 0.1.13 - 0.1.15 | 3.2.0 | 2.13.8 | 2.12.16 |
| 0.1.16 - current | 3.2.0 | 2.13.9 | 2.12.17 |