Skip to content

Commit 37a2bd7

Browse files
authored
Merge pull request #2140 from lwronski/dump-scala
Update scala 3 to 3.3.0
2 parents d9aff5c + c5f28d1 commit 37a2bd7

File tree

7 files changed

+30
-35
lines changed

7 files changed

+30
-35
lines changed

modules/integration/src/test/scala/scala/cli/integration/ExportJsonTestDefinitions.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ abstract class ExportJsonTestDefinitions(val scalaVersionOpt: Option[String])
3939
val jsonContents = readJson(exportJsonProc.out.text())
4040

4141
expect(jsonContents ==
42-
"""{
43-
|"scalaVersion":"3.2.2",
42+
s"""{
43+
|"scalaVersion":"${Constants.scala3}",
4444
|"platform":"JVM",
4545
|"jvmVersion":"adopt:11",
4646
|"scopes": {
@@ -74,6 +74,7 @@ abstract class ExportJsonTestDefinitions(val scalaVersionOpt: Option[String])
7474
"""//> using lib "com.lihaoyi::os-lib:0.7.8"
7575
|//> using option "-Xasync"
7676
|//> using plugin "org.wartremover:::wartremover:3.0.9"
77+
|//> using scala 3.2.2
7778
|
7879
|object Main {
7980
| def main(args: Array[String]): Unit =

modules/integration/src/test/scala/scala/cli/integration/RunScriptTestDefinitions.scala

Lines changed: 12 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -247,30 +247,23 @@ trait RunScriptTestDefinitions { _: RunTestDefinitions =>
247247
// format: on
248248
val res = os.proc(cmd).call(cwd = root, check = false, mergeErrIntoOut = true)
249249
val output = res.out.lines()
250-
val exceptionLines = output
250+
val exceptionLines: Vector[String] = output
251251
.map(stripAnsi)
252252
.dropWhile(!_.startsWith("Exception in thread "))
253253
val tab = "\t"
254-
val expectedLines =
255-
s"""Exception in thread "main" java.lang.Exception: Caught exception during processing
256-
|${tab}at throws$$_.<init>(throws.sc:8)
257-
|${tab}at throws_sc$$.script(throws.sc:25)
258-
|${tab}at throws_sc$$.main(throws.sc:29)
259-
|${tab}at throws_sc.main(throws.sc)
260-
|Caused by: java.lang.RuntimeException: nope
261-
|${tab}at scala.sys.package$$.error(package.scala:27)
262-
|${tab}at throws$$_.something(throws.sc:3)
263-
|${tab}at throws$$_.<init>(throws.sc:5)
264-
|$tab... 3 more""".stripMargin.linesIterator.toVector
254+
255+
val (caughtLines, causedLines) = exceptionLines.span(!_.startsWith("Caused by:"))
256+
257+
assert(caughtLines.length > 1)
258+
assert(caughtLines.contains(s"${tab}at throws$$_.<init>(throws.sc:8)"), clues(caughtLines))
259+
260+
assert(causedLines.length > 1)
265261
assert(
266-
exceptionLines.length == expectedLines.length,
267-
clues(output, exceptionLines.length, expectedLines.length)
262+
causedLines.contains(s"Caused by: java.lang.RuntimeException: nope") &&
263+
causedLines.contains(s"${tab}at throws$$_.something(throws.sc:3)") &&
264+
causedLines.contains(s"${tab}at throws$$_.<init>(throws.sc:5)"),
265+
clues(causedLines)
268266
)
269-
for (i <- exceptionLines.indices)
270-
assert(
271-
exceptionLines(i) == expectedLines(i),
272-
clues(output, exceptionLines(i), expectedLines(i))
273-
)
274267
}
275268
}
276269

project/deps.sc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ object Scala {
88
def scala212 = "2.12.17"
99
def scala213 = "2.13.10"
1010
def runnerScala3 = "3.0.2" // the newest version that is compatible with all Scala 3.x versions
11-
def scala3 = "3.2.2"
11+
def scala3 = "3.3.0"
1212
val allScala2 = Seq(scala213, scala212)
1313
val all = allScala2 ++ Seq(scala3)
1414
val mainVersions = Seq(scala3, scala213)
@@ -33,7 +33,7 @@ object Scala {
3333

3434
def maxAmmoniteScala212Version = scala212
3535
def maxAmmoniteScala213Version = scala213
36-
def maxAmmoniteScala3Version = scala3
36+
def maxAmmoniteScala3Version = "3.2.2"
3737
lazy val listAllAmmonite = {
3838
import coursier.core.Version
3939
val max212 = Version(maxAmmoniteScala212Version)

website/docs/reference/cli-options.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1420,7 +1420,7 @@ Available in commands:
14201420

14211421
Aliases: `-S`, `--scala`
14221422

1423-
Set the Scala version (3.2.2 by default)
1423+
Set the Scala version (3.3.0 by default)
14241424

14251425
### `--scala-binary-version`
14261426

website/docs/reference/scala-command/cli-options.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -912,7 +912,7 @@ Aliases: `-S`, `--scala`
912912

913913
`MUST have` per Scala Runner specification
914914

915-
Set the Scala version (3.2.2 by default)
915+
Set the Scala version (3.3.0 by default)
916916

917917
### `--scala-binary-version`
918918

website/docs/reference/scala-command/runner-specification.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ Aliases: `--plugin` ,`-P`
7676

7777
**--scala-version**
7878

79-
Set the Scala version (3.2.2 by default)
79+
Set the Scala version (3.3.0 by default)
8080

8181
Aliases: `-S` ,`--scala`
8282

@@ -780,7 +780,7 @@ Aliases: `--plugin` ,`-P`
780780

781781
**--scala-version**
782782

783-
Set the Scala version (3.2.2 by default)
783+
Set the Scala version (3.3.0 by default)
784784

785785
Aliases: `-S` ,`--scala`
786786

@@ -1319,7 +1319,7 @@ Aliases: `--plugin` ,`-P`
13191319

13201320
**--scala-version**
13211321

1322-
Set the Scala version (3.2.2 by default)
1322+
Set the Scala version (3.3.0 by default)
13231323

13241324
Aliases: `-S` ,`--scala`
13251325

@@ -1872,7 +1872,7 @@ Aliases: `--plugin` ,`-P`
18721872

18731873
**--scala-version**
18741874

1875-
Set the Scala version (3.2.2 by default)
1875+
Set the Scala version (3.3.0 by default)
18761876

18771877
Aliases: `-S` ,`--scala`
18781878

@@ -2450,7 +2450,7 @@ Aliases: `--plugin` ,`-P`
24502450

24512451
**--scala-version**
24522452

2453-
Set the Scala version (3.2.2 by default)
2453+
Set the Scala version (3.3.0 by default)
24542454

24552455
Aliases: `-S` ,`--scala`
24562456

@@ -3016,7 +3016,7 @@ Aliases: `--plugin` ,`-P`
30163016

30173017
**--scala-version**
30183018

3019-
Set the Scala version (3.2.2 by default)
3019+
Set the Scala version (3.3.0 by default)
30203020

30213021
Aliases: `-S` ,`--scala`
30223022

@@ -3601,7 +3601,7 @@ Aliases: `--plugin` ,`-P`
36013601

36023602
**--scala-version**
36033603

3604-
Set the Scala version (3.2.2 by default)
3604+
Set the Scala version (3.3.0 by default)
36053605

36063606
Aliases: `-S` ,`--scala`
36073607

@@ -4243,7 +4243,7 @@ Aliases: `--plugin` ,`-P`
42434243

42444244
**--scala-version**
42454245

4246-
Set the Scala version (3.2.2 by default)
4246+
Set the Scala version (3.3.0 by default)
42474247

42484248
Aliases: `-S` ,`--scala`
42494249

@@ -5092,7 +5092,7 @@ Aliases: `--plugin` ,`-P`
50925092

50935093
**--scala-version**
50945094

5095-
Set the Scala version (3.2.2 by default)
5095+
Set the Scala version (3.3.0 by default)
50965096

50975097
Aliases: `-S` ,`--scala`
50985098

website/docs/reference/scala-versions.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,6 @@ it is recommended to update scala-cli.
1717
| 0.1.13 - 0.1.15 | 3.2.0 | 2.13.8 | 2.12.16 |
1818
| 0.1.16 - 0.1.17 | 3.2.0 | 2.13.10 | 2.12.17 |
1919
| 0.1.18 - 0.1.19 | 3.2.1 | 2.13.10 | 2.12.17 |
20-
| 0.1.20 - current | 3.2.2 | 2.13.10 | 2.12.17 |
20+
| 0.1.20 - 1.0.0-RC2 | 3.2.2 | 2.13.10 | 2.12.17 |
21+
| 1.0.0 - current | 3.3.0 | 2.13.10 | 2.12.17 |
2122

0 commit comments

Comments
 (0)