Skip to content

Commit 471b102

Browse files
committed
Fix docs & gifs tests to support Scala Native 0.5.x
1 parent 12cdf52 commit 471b102

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

gifs/scenarios/universal_tool.sh

Lines changed: 2 additions & 2 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.6 -
15+
echo "println(1)" | scala-cli --native -S 2.13 -
1616

1717
# or do other preparation (e.g. create code)
1818
else
@@ -38,7 +38,7 @@ object Native extends App {
3838
EOF
3939

4040
pe "# Scala Native works only with Scala 2.x so far"
41-
pe "scala-cli --native -S 2.13.6 native.scala"
41+
pe "scala-cli --native -S 2.13 native.scala"
4242
doSleep 3
4343

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

website/docs/commands/package.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ object Hello {
309309
<ChainedSnippets>
310310

311311
```bash
312-
scala-cli --power package --native HelloNative.scala -S 2.13.6 -o hello
312+
scala-cli --power package --native HelloNative.scala -S 2.13 -o hello
313313
file hello
314314
```
315315

website/docs/commands/run.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ the [Scala Native requirements](https://scala-native.readthedocs.io/en/latest/us
252252
need to be [installed](/install#scala-native) for this to work:
253253

254254
```bash
255-
scala-cli Hello.scala --native -S 2.13.6
255+
scala-cli Hello.scala --native -S 2.13
256256
```
257257

258258
It is also possible to achieve it using `--platform` option:

website/docs/cookbooks/introduction/instant-startup-scala-scripts.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ scala-cli size-higher-than.scala -- dir 20
4444
```
4545

4646
```text
47-
Compiling project (Scala 3.1.1, JVM)
48-
Compiled project (Scala 3.1.1, JVM)
47+
Compiling project (Scala 3.4.1, JVM)
48+
Compiled project (Scala 3.4.1, JVM)
4949
/Users/user/Documents/workspace/dir/large-file.txt
5050
```
5151
</ChainedSnippets>
@@ -55,8 +55,8 @@ We can fix that by either running with a `—-native` option, or,
5555
in this case, by including an additional using directive:
5656

5757
```scala compile title=size-higher-than.scala
58-
//> using scala 3.1.1
59-
//> using dep com.lihaoyi::os-lib::0.8.1
58+
//> using scala 3
59+
//> using dep com.lihaoyi::os-lib::0.10.0
6060
//> using platform scala-native
6161

6262
@main
@@ -81,8 +81,8 @@ We can make the runtime itself even faster, using various Scala Native optimizat
8181
We pass these using a `-–native-mode` scala-cli option or, like previously, by adding a using directive:
8282

8383
```scala compile title=size-higher-than.scala
84-
//> using scala 3.1.1
85-
//> using dep com.lihaoyi::os-lib::0.8.1
84+
//> using scala 3
85+
//> using dep com.lihaoyi::os-lib::0.10.0
8686
//> using platform scala-native
8787
//> using nativeMode release-full
8888

0 commit comments

Comments
 (0)