Skip to content

Commit a7372a9

Browse files
authored
Use Scala 3 in the Scala Native gif (#3195)
1 parent 6818c32 commit a7372a9

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

gifs/scenarios/universal_tool.sh

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ if [[ -z "${ASCIINEMA_REC}" ]]; then
1212
# Warm up scala-cli
1313
echo "println(1)" | scala-cli -
1414
echo "println(1)" | scala-cli --js - &&
15-
echo "println(1)" | scala-cli --native -S 2.13 -
15+
echo "println(1)" | scala-cli --native -
1616

1717
# or do other preparation (e.g. create code)
1818
else
@@ -31,14 +31,11 @@ EOF
3131
clearConsole
3232

3333
cat <<EOF | updateFile native.scala
34-
object Native extends App {
35-
import scala.scalanative.posix.limits
36-
println(s"Max path length in this OS is \${limits.PATH_MAX}")
37-
}
34+
import scala.scalanative.posix.limits
35+
@main def native() = println(s"Max path length in this OS is \${limits.PATH_MAX}")
3836
EOF
3937

40-
pe "# Scala Native works only with Scala 2.x so far"
41-
pe "scala-cli --native -S 2.13 native.scala"
38+
pe "scala-cli --native native.scala"
4239
doSleep 3
4340

4441
echo " " && echo "ok" > status.txt

0 commit comments

Comments
 (0)