@@ -9,9 +9,17 @@ object Scala {
9
9
def scala213 = " 2.13.12"
10
10
def runnerScala3 = " 3.0.2" // the newest version that is compatible with all Scala 3.x versions
11
11
def scala3 = " 3.3.1"
12
- val allScala2 = Seq (scala213, scala212)
13
- val all = allScala2 ++ Seq (scala3)
14
- val mainVersions = Seq (scala3, scala213)
12
+
13
+ // The Scala version used to build the CLI itself.
14
+ def defaultInternal = sys.props.get(" scala.version.internal" ).getOrElse(scala3)
15
+
16
+ // The Scala version used by default to compile user input.
17
+ def defaultUser = sys.props.get(" scala.version.user" ).getOrElse(scala3)
18
+
19
+ val allScala2 = Seq (scala213, scala212)
20
+ val defaults = Seq (defaultInternal, defaultUser).distinct
21
+ val all = (allScala2 ++ Seq (scala3) ++ defaults).distinct
22
+ val mainVersions = (Seq (scala3, scala213) ++ defaults).distinct
15
23
val runnerScalaVersions = runnerScala3 +: allScala2
16
24
17
25
def scalaJs = " 1.13.2"
@@ -23,12 +31,14 @@ object Scala {
23
31
val max213 = patchVer(scala213)
24
32
val max30 = 2
25
33
val max31 = 3
26
- val max32 = patchVer(scala3)
34
+ val max32 = 2
35
+ val max33 = patchVer(scala3)
27
36
(8 until max212).map(i => s " 2.12. $i" ) ++ Seq (scala212) ++
28
37
(0 until max213).map(i => s " 2.13. $i" ) ++ Seq (scala213) ++
29
38
(0 to max30).map(i => s " 3.0. $i" ) ++
30
39
(0 to max31).map(i => s " 3.1. $i" ) ++
31
- (0 until max32).map(i => s " 3.2. $i" ) ++ Seq (scala3)
40
+ (0 to max32).map(i => s " 3.2. $i" ) ++
41
+ (0 until max33).map(i => s " 3.3. $i" ) ++ Seq (scala3)
32
42
}
33
43
34
44
def maxAmmoniteScala212Version = scala212
@@ -52,14 +62,6 @@ object Scala {
52
62
true
53
63
}
54
64
}
55
-
56
- // The Scala version used to build the CLI itself.
57
- // We should be able to switch to 3.x when it'll have CPS support
58
- // (for the either { value(…) } stuff)
59
- def defaultInternal = scala3
60
-
61
- // The Scala version used by default to compile user input.
62
- def defaultUser = scala3
63
65
}
64
66
65
67
// Dependencies used in integration test fixtures
0 commit comments