Skip to content

Commit 7f5f2e8

Browse files
Add 0.1.16 release notes (#1456)
1 parent 518f200 commit 7f5f2e8

File tree

1 file changed

+133
-14
lines changed

1 file changed

+133
-14
lines changed

website/docs/release_notes.md

Lines changed: 133 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,125 @@ sidebar_position: 99
55

66
# Release notes
77

8+
## [v0.1.16](https://github.com/VirtusLab/scala-cli/releases/tag/v0.1.16)
9+
10+
This release consists mainly of updates, fixes, and various enhancements of existing features.
11+
12+
## Enhancements
13+
14+
### Specifying javac options via using directives
15+
16+
javac options can now be added via using directives, like
17+
```scala
18+
//> using javacOpt "source", "1.8", "target", "1.8"
19+
```
20+
21+
Added by [@lwronski](https://github.com/lwronski) in https://github.com/VirtusLab/scala-cli/pull/1438
22+
23+
### Pressing enter in watch mode proceeds to run / compile / test / … again
24+
25+
In watch mode (using the `-w` or `--watch` option), pressing Enter when Scala CLI is watching for changes makes it run again what it's supposed to be doing (compiling, running, running tests, or packaging, etc.) This is inspired by Mill's behaviour in watch mode, which supports the same feature.
26+
27+
Added by [@alexarchambault](https://github.com/alexarchambault) in https://github.com/VirtusLab/scala-cli/pull/1451
28+
29+
### Installation via Scoop on Windows
30+
31+
Scala CLI can now be installed via [Scoop](https://scoop.sh) on Windows, with a command such as
32+
```bat
33+
scoop install scala-cli
34+
```
35+
36+
Added by [@nightscape](https://github.com/nightscape) in https://github.com/VirtusLab/scala-cli/pull/1416, thanks to him!
37+
38+
### Actionable diagnostics in Metals
39+
40+
Scala CLI should now send text edit suggestions with some of its diagnostics, via BSP, so that editors
41+
can suggest those edits to users. This should work in upcoming versions of Metals in particular.
42+
43+
Added by [@lwronski](https://github.com/lwronski) in https://github.com/VirtusLab/scala-cli/pull/1448
44+
45+
### Other
46+
47+
* Add `--scalapy-version` option by [@alexarchambault](https://github.com/alexarchambault) in https://github.com/VirtusLab/scala-cli/pull/1397
48+
49+
## Fixes
50+
51+
### Fixes in Scala Native binaries caching
52+
53+
When running a sequence of commands such as
54+
```bash
55+
$ scala-cli run --native .
56+
$ scala-cli package --native . -o my-app
57+
```
58+
Scala CLI should cache a Scala Native binary during the first command, so that the second command can just re-use it, rather than generating a binary again. This also fixes the re-use of compilation artifacts between both commands, so that the Scala CLI project isn't re-compiled during the second command either.
59+
60+
Fixed by [@alexarchambault](https://github.com/alexarchambault) in https://github.com/VirtusLab/scala-cli/pull/1406
61+
62+
### Accept more scalac options without escaping
63+
64+
Scala CLI now accepts options such as `-release`, `-encoding`, `-color`, `-feature`, `-deprecation` and `-nowarn`, without requiring them to be escaped by `-O`. It also accepts `--scalac-verbose`, which is equivalent to `-O -verbose` (increases scalac verbosity). Lastly, it warns when `-release` and / or `-target:<target>` are inconsistent with `--jvm`.
65+
66+
Fixed by [@Gedochao](https://github.com/Gedochao) in https://github.com/VirtusLab/scala-cli/pull/1413
67+
68+
### Fix `--java-option` and `--javac-option` handling in `package` sub-command
69+
70+
`--java-option` and `--javac-option` should now be accepted and handled properly in the `package` sub-command.
71+
72+
Fixed by [@lwronski](https://github.com/lwronski) in https://github.com/VirtusLab/scala-cli/pull/1434
73+
74+
### Fix wrong file name when publising Scala.js artifacts locally
75+
76+
The `publish local` sub-command used to publish Scala.js artifacts with a malformed suffix. This is now fixed.
77+
78+
Fixed by [@lwronski](https://github.com/lwronski) in https://github.com/VirtusLab/scala-cli/pull/1443
79+
80+
### Fix spurious stack traces in the `publish` and `publish local` sub-commands
81+
82+
The `publish` and `publish local` commands could print spurious stack traces when run with non-default locales, using native Scala CLI binaries. This is now fixed.
83+
84+
Fixed by [@romanowski](https://github.com/romanowski) in https://github.com/VirtusLab/scala-cli/pull/1423
85+
86+
### Make `run --python --native` work from Python virtualenv
87+
88+
Using both `--native` and `--python` in the `run` sub-command should work fine from Python virtualenv.
89+
90+
Fixed by [@kiendang](https://github.com/kiendang) in https://github.com/VirtusLab/scala-cli/pull/1399
91+
92+
## Documentation / help updates
93+
* Dump scala 2 version in docs by [@lwronski](https://github.com/lwronski) in https://github.com/VirtusLab/scala-cli/pull/1408
94+
* Ensure the the `repl` & default sub-commands respect group help options by [@Gedochao](https://github.com/Gedochao) in https://github.com/VirtusLab/scala-cli/pull/1417
95+
* Remove stray `_` typo by [@armanbilge](https://github.com/armanbilge) in https://github.com/VirtusLab/scala-cli/pull/1385
96+
* Add docs on how to install scala-cli for M1 by [@lwronski](https://github.com/lwronski) in https://github.com/VirtusLab/scala-cli/pull/1431
97+
* Debugging cookbook by [@wleczny](https://github.com/wleczny) in https://github.com/VirtusLab/scala-cli/pull/1441
98+
99+
## Updates / maintainance
100+
* Update scala-cli.sh launcher for 0.1.15 by [@github-actions](https://github.com/github-actions) in https://github.com/VirtusLab/scala-cli/pull/1401
101+
* Revert scalafmt fix by [@lwronski](https://github.com/lwronski) in https://github.com/VirtusLab/scala-cli/pull/1402
102+
* Bump respective Scala versions to `2.12.17` & `2.13.9` and Ammonite to `2.5.4-33-0af04a5b` by [@Gedochao](https://github.com/Gedochao) in https://github.com/VirtusLab/scala-cli/pull/1405
103+
* Turn off running tests in PR for M1 runner by [@lwronski](https://github.com/lwronski) in https://github.com/VirtusLab/scala-cli/pull/1403
104+
* Bump VirtusLab/scala-cli-setup from 0.1.14.1 to 0.1.15 by [@dependabot](https://github.com/dependabot) in https://github.com/VirtusLab/scala-cli/pull/1414
105+
* Bump coursier/setup-action from f883d08305acbc28e5e5363bf5ec086397627021 to 1.2.1 by [@dependabot](https://github.com/dependabot) in https://github.com/VirtusLab/scala-cli/pull/1415
106+
* Tweak the release procedure by [@Gedochao](https://github.com/Gedochao) in https://github.com/VirtusLab/scala-cli/pull/1426
107+
* Update case-app_2.13 to 2.1.0-M17 & scala-cli-signing to v0.1.10 by [@lwronski](https://github.com/lwronski) in https://github.com/VirtusLab/scala-cli/pull/1427
108+
* Automate choco package deploy by [@wleczny](https://github.com/wleczny) in https://github.com/VirtusLab/scala-cli/pull/1412
109+
* Generate pkg package for m1 by [@lwronski](https://github.com/lwronski) in https://github.com/VirtusLab/scala-cli/pull/1410
110+
* Re-enable gif tests by [@alexarchambault](https://github.com/alexarchambault) in https://github.com/VirtusLab/scala-cli/pull/1436
111+
* Bump Scala 2.13.x to 2.13.10 & Ammonite to 2.5.5 by [@Gedochao](https://github.com/Gedochao) in https://github.com/VirtusLab/scala-cli/pull/1437
112+
* Remove mill-scala-cli stuff from build by [@alexarchambault](https://github.com/alexarchambault) in https://github.com/VirtusLab/scala-cli/pull/1433
113+
* Add support for BSP's `buildTarget/outputPaths` and update bsp4j to 2… by [@lwronski](https://github.com/lwronski) in https://github.com/VirtusLab/scala-cli/pull/1439
114+
* Update bsp4j to 2.1.0-M3 by [@lwronski](https://github.com/lwronski) in https://github.com/VirtusLab/scala-cli/pull/1444
115+
* Update scala-packager to 0.1.29 and hardcode upgradeCodeGuid by [@lwronski](https://github.com/lwronski) in https://github.com/VirtusLab/scala-cli/pull/1446
116+
* Refactor `ScalaCommand` to enforce respecting help options by [@Gedochao](https://github.com/Gedochao) in https://github.com/VirtusLab/scala-cli/pull/1440
117+
* Address compilation warnings by [@alexarchambault](https://github.com/alexarchambault) in https://github.com/VirtusLab/scala-cli/pull/1452
118+
* Update coursier to 2.1.0-M7 by [@alexarchambault](https://github.com/alexarchambault) in https://github.com/VirtusLab/scala-cli/pull/1447
119+
* Update bloop to 1.5.4-sc-3 by [@alexarchambault](https://github.com/alexarchambault) in https://github.com/VirtusLab/scala-cli/pull/1454
120+
121+
## New Contributors
122+
* [@nightscape](https://github.com/nightscape) made their first contribution in https://github.com/VirtusLab/scala-cli/pull/1416
123+
* [@kiendang](https://github.com/kiendang) made their first contribution in https://github.com/VirtusLab/scala-cli/pull/1399
124+
125+
**Full Changelog**: https://github.com/VirtusLab/scala-cli/compare/v0.1.15...v0.1.16
126+
8127
## [v0.1.15](https://github.com/VirtusLab/scala-cli/releases/tag/v0.1.15)
9128

10129
## The M1 native launcher is here! (experimental)
@@ -23,9 +142,9 @@ Passing the `--python` option allows using `ScalaPy` with the `repl` sub-command
23142
▶ scala-cli --python
24143
Welcome to Scala 3.2.0 (17.0.2, Java OpenJDK 64-Bit Server VM).
25144
Type in expressions for evaluation. Or try :help.
26-
145+
27146
scala> import me.shadaj.scalapy.py
28-
147+
29148
scala> py.Dynamic.global.range(1, 4)
30149
val res0: me.shadaj.scalapy.py.Dynamic = range(1, 4)
31150
```
@@ -43,7 +162,7 @@ To be backward compatible with the `scala` command, some changes have been made
43162
Hello
44163
```
45164

46-
* The `-d` option is no longer an alias for `--dependency`, but for `--compilation-output`.
165+
* The `-d` option is no longer an alias for `--dependency`, but for `--compilation-output`.
47166
* `-O -d -O path/to/compilation/output` now defaults to `-d path/to/compilation/output`.
48167

49168
```
@@ -77,7 +196,7 @@ Hello
77196

78197
```
79198
▶ scala-cli compile Hello.scala -d out
80-
▶ scala-cli run -classpath out
199+
▶ scala-cli run -classpath out
81200
Hello
82201
```
83202

@@ -189,7 +308,7 @@ $ scala-cli -S 3
189308
Welcome to Scala 3.1.3 (17.0.3, Java OpenJDK 64-Bit Server VM).
190309
Type in expressions for evaluation. Or try :help.
191310
192-
scala>
311+
scala>
193312
```
194313

195314
When inputs are provided, Scala CLI defaults to the `run` sub-command, as before.
@@ -233,11 +352,11 @@ This change was added by [@lwronski](https://github.com/lwronski) in [#1314](htt
233352
Scala CLI now allows embedding resources (by default) in a Scala Native binary with the `--native` flag.
234353

235354
```
236-
$ cat resources/scala-native/foo.c
355+
$ cat resources/scala-native/foo.c
237356
int foo(int i) {
238357
return i + 42;
239358
}
240-
$ cat hello.scala
359+
$ cat hello.scala
241360
//> using platform "native"
242361
//> using resourceDir "resources"
243362
@@ -248,7 +367,7 @@ def foo(int: CInt): CInt = extern
248367
249368
@main def main =
250369
println(foo(3))
251-
$ scala-cli hello.scala --native
370+
$ scala-cli hello.scala --native
252371
45
253372
```
254373

@@ -267,7 +386,7 @@ If you still want to pass a snippet to the `repl`, you can either pass the `repl
267386
$ scala-cli --script-snippet 'println("Hello")'
268387
Welcome to Scala 3.1.3 (17.0.2, Java OpenJDK 64-Bit Server VM).
269388
Type in expressions for evaluation. Or try :help.
270-
389+
271390
scala> snippet_sc.main(Array.empty)
272391
Hello
273392
```
@@ -414,7 +533,7 @@ $ scala-cli fmt --scalafmt-conf path/to/the/conf/.scalafmt.conf
414533
```
415534
You can also pass the configuration straight from the terminal with `--scalafmt-conf-str`.
416535
```text
417-
$ scala-cli fmt --scalafmt-conf-str "version=3.5.5
536+
$ scala-cli fmt --scalafmt-conf-str "version=3.5.5
418537
runner.dialect=scala213"
419538
```
420539
Added in [#1227](https://github.com/VirtusLab/scala-cli/pull/1227) by [wleczny](https://github.com/wleczny)
@@ -423,7 +542,7 @@ Added in [#1227](https://github.com/VirtusLab/scala-cli/pull/1227) by [wleczny](
423542
It is now possible to set the `--interactive` mode on by default, so that passing it explicitly isn't necessary.
424543

425544
The next time when you run a command with the `--interactive` option set to on, Scala CLI will suggest to turn it on
426-
permanently.
545+
permanently.
427546

428547
This is recommended for environments where `scala-cli` is used by a human user only (and not by any automation).
429548

@@ -512,7 +631,7 @@ It is now possible to pass the `output` option of the `package` command with [us
512631
Added in [#1213](https://github.com/VirtusLab/scala-cli/pull/1213) by [wleczny](https://github.com/wleczny)
513632

514633
### Add support for running multiple snippets of the same kind
515-
Scala CLI now allows to pass multiple snippets of the same kind.
634+
Scala CLI now allows to pass multiple snippets of the same kind.
516635

517636
It was previously possible to mix different kinds (so to pass a Java snippet alongside a Scala one), but not for example 2 separate Scala snippets. That limitation no longer applies.
518637

@@ -633,7 +752,7 @@ Hello
633752
$ scala-cli --script-snippet 'println("Hello")'
634753
Hello
635754
636-
$ scala-cli --scala-snippet '@main def run() = println("Hello")'
755+
$ scala-cli --scala-snippet '@main def run() = println("Hello")'
637756
Hello
638757
639758
$ scala-cli --java-snippet 'public class Main { public static void main(String[] args) { System.out.println("Hello"); } }'
@@ -828,7 +947,7 @@ Additionally, a couple of `scalafmt`'s native options received aliases in Scala
828947

829948
`--respect-project-filters` is an alias for `-F --respect-project-filters`. Because of the way sources are passed by
830949
Scala CLI to `scalafmt` under the hood, we now turn it on by default to respect any `project.excludePaths` settings in
831-
the user's `.scalafmt.conf`.
950+
the user's `.scalafmt.conf`.
832951
It can be disabled by passing `--respect-project-filters=false` to revert to previous behaviour.
833952
This addresses [#1121](https://github.com/VirtusLab/scala-cli/issues/1121)
834953

0 commit comments

Comments
 (0)