Skip to content

Commit f2cbce2

Browse files
committed
Use the newest Ammonite with Scala 3 Next (3.4.2)
1 parent 1ef5abf commit f2cbce2

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

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

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ abstract class ReplTestDefinitions extends ScalaCliSuite with TestScalaVersionAr
1313
"scala.util.Properties.versionNumberString"
1414
else "dotty.tools.dotc.config.Properties.simpleVersionString"
1515

16-
def expectedAmmoniteVersion: String =
16+
def expectedScalaVersionForAmmonite: String =
1717
actualScalaVersion match {
1818
case s
1919
if s.startsWith("2.12") &&
@@ -62,7 +62,10 @@ abstract class ReplTestDefinitions extends ScalaCliSuite with TestScalaVersionAr
6262
os.proc(TestUtil.cli, "--power", "repl", testExtraOptions, "--ammonite", ammArgs)
6363
.call(cwd = root, stderr = os.Pipe)
6464
val output = res.out.trim()
65-
expect(output == s"Hello from Scala $expectedAmmoniteVersion")
65+
val expectedSv =
66+
if (useMaxAmmoniteScalaVersion) actualMaxAmmoniteScalaVersion
67+
else expectedScalaVersionForAmmonite
68+
expect(output == s"Hello from Scala $expectedSv")
6669
if (useMaxAmmoniteScalaVersion) {
6770
// the maximum Scala version supported by ammonite is being used, so we shouldn't downgrade
6871
val errOutput = res.err.trim()
@@ -122,8 +125,11 @@ abstract class ReplTestDefinitions extends ScalaCliSuite with TestScalaVersionAr
122125
"--python",
123126
ammArgs
124127
).call(cwd = root, stderr = os.Pipe)
128+
val expectedSv =
129+
if (useMaxAmmoniteScalaVersion) actualMaxAmmoniteScalaVersion
130+
else expectedScalaVersionForAmmonite
125131
val lines = res.out.trim().linesIterator.toVector
126-
expect(lines == Seq(s"Hello from Scala $expectedAmmoniteVersion", "Hello from ScalaPy"))
132+
expect(lines == Seq(s"Hello from Scala $expectedSv", "Hello from ScalaPy"))
127133
if (useMaxAmmoniteScalaVersion)
128134
// the maximum Scala version supported by ammonite is being used, so we shouldn't downgrade
129135
expect(!res.err.trim().contains("not yet supported with this version of Ammonite"))

project/deps.sc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ object Scala {
4848

4949
def maxAmmoniteScala212Version = scala212
5050
def maxAmmoniteScala213Version = scala213
51-
def maxAmmoniteScala3Version = scala3Lts
51+
def maxAmmoniteScala3Version = scala3Next
5252
lazy val listMaxAmmoniteScalaVersion =
5353
Seq(maxAmmoniteScala212Version, maxAmmoniteScala213Version, maxAmmoniteScala3Version)
5454
lazy val listAllAmmonite = {

0 commit comments

Comments
 (0)