Skip to content

Commit 1d13e37

Browse files
committed
Add release notes for Scala CLI v1.5.0
1 parent 5dd4c64 commit 1d13e37

File tree

1 file changed

+182
-0
lines changed

1 file changed

+182
-0
lines changed

website/docs/release_notes.md

Lines changed: 182 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,188 @@ import ReactPlayer from 'react-player'
88

99
# Release notes
1010

11+
## [v1.5.0](https://github.com/VirtusLab/scala-cli/releases/tag/v1.5.0)
12+
13+
### Support for Scala 3.5.0
14+
This Scala CLI version switches the default Scala version to 3.5.0.
15+
16+
```bash
17+
scala-cli version
18+
# Scala CLI version: 1.5.0
19+
# Scala version (default): 3.5.0
20+
```
21+
22+
Added by [@Gedochao](https://github.com/Gedochao) in [#3093](https://github.com/VirtusLab/scala-cli/pull/3093).
23+
24+
### Support for Scala Native 0.5.5
25+
This Scala CLI version switches the default Scala Native version to 0.5.5.
26+
27+
```bash
28+
scala-cli -e 'println("Hello from Scala Native 0.5.5!")' --native
29+
# Compiling project (Scala 3.5.0, Scala Native 0.5.5)
30+
# Compiled project (Scala 3.5.0, Scala Native 0.5.5)
31+
# [info] Linking (multithreadingEnabled=true, disable if not used) (894 ms)
32+
# [info] Discovered 888 classes and 5407 methods after classloading
33+
# [info] Checking intermediate code (quick) (31 ms)
34+
# [info] Multithreading was not explicitly enabled - initial class loading has not detected any usage of system threads. Multithreading support will be disabled to improve performance.
35+
# [info] Linking (multithreadingEnabled=false) (299 ms)
36+
# [info] Discovered 499 classes and 2497 methods after classloading
37+
# [info] Checking intermediate code (quick) (5 ms)
38+
# [info] Discovered 478 classes and 1912 methods after optimization
39+
# [info] Optimizing (debug mode) (403 ms)
40+
# [info] Produced 9 LLVM IR files
41+
# [info] Generating intermediate code (368 ms)
42+
# [info] Compiling to native code (1565 ms)
43+
# [info] Linking with [pthread, dl]
44+
# [info] Linking native code (immix gc, none lto) (83 ms)
45+
# [info] Postprocessing (0 ms)
46+
# [info] Total (3625 ms)
47+
# Hello from Scala Native 0.5.5!
48+
```
49+
50+
Added by [@Gedochao](https://github.com/Gedochao) in [#3117](https://github.com/VirtusLab/scala-cli/pull/3117).
51+
52+
### (⚡️ experimental) Support for exporting to a Maven project
53+
It is now possible to export a Scala CLI project to Maven.
54+
55+
```bash
56+
scala-cli export --script-snippet 'println("No need to create the pom.xml yourself!")' --mvn --power -o mvn-demo
57+
# Some utilized features are marked as experimental:
58+
# - `export` sub-command
59+
# - `--mvn` option
60+
# Please bear in mind that non-ideal user experience should be expected.
61+
# If you encounter any bugs or have feedback to share, make sure to reach out to the maintenance team at https://github.com/VirtusLab/scala-cli
62+
# Exporting to a maven project...
63+
# Exported to: ~/scala-cli-tests/mvn-demo
64+
cd mvn-demo
65+
mvn scala:run -DmainClass=snippet_sc
66+
# (...)
67+
# No need to create the pom.xml yourself!
68+
# [INFO] ------------------------------------------------------------------------
69+
# [INFO] BUILD SUCCESS
70+
# [INFO] ------------------------------------------------------------------------
71+
# [INFO] Total time: 2.589 s
72+
# [INFO] Finished at: 2024-08-22T12:08:36+02:00
73+
# [INFO] ------------------------------------------------------------------------
74+
```
75+
76+
Added by [@yadavan88](https://github.com/yadavan88) in [#3003](https://github.com/VirtusLab/scala-cli/pull/3003).
77+
78+
### Support for launching apps from dependencies without other inputs
79+
It is now possible to launch an app by just specifying its dependency, without the need to provide any source files.
80+
In such a case the build server will not be started, as there's no compilation to be done.
81+
There's also no need to specify the main class, as it's now being detected automatically in dependencies as well.
82+
Do note that explicitly calling the `run` sub-command is necessary here, as otherwise Scala CLI will default to the REPL.
83+
84+
```bash
85+
scala-cli run --dep io.get-coursier:coursier-cli_2.13:2.1.10 -- version
86+
# 2.1.10
87+
```
88+
89+
This can be used similarly to [Coursier's `cs launch`](https://get-coursier.io/docs/cli-launch).
90+
91+
Added by [@kasiaMarek](https://github.com/kasiaMarek) in [#3079](https://github.com/VirtusLab/scala-cli/pull/3079).
92+
93+
### (⚡️ experimental) JMH available in various commands and via `using` directives
94+
Some improvements have been done to the experimental support for JMH (Java Microbenchmark Harness).
95+
96+
The `--jmh` and `--jmh-version` options can now be passed to a number of commands:
97+
- `run`, as it was before (note that when `--jmh` is passed to `run`, the project's main class will default to running the benchmarks rather than the project's default main method; this behaviour is likely to be changed in future versions);
98+
- `compile`, so that a Scala CLI project with benchmarking can be compiled separately from being run;
99+
- `package`, although the resulting artifacts will run the project as normal for now, rather than benchmarks;
100+
- `setup-ide`, so that benchmarking projects can be imported to your IDE of choice;
101+
- `test` and `export` will now also no longer fail with `--jmh`, although no specific implementations for benchmarking are in place there yet.
102+
103+
It is now also possible to control JMH with `using` directives:
104+
- `//> using jmh` allows to enable JMH for the project, being the equivalent of the `--jmh` option.
105+
- `//> using jmhVersion <version>` allows to set the JMH version to use, being the equivalent of the `--jmh-version` option.
106+
107+
```scala compile power
108+
//> using jmh
109+
//> using jmhVersion 1.37
110+
package bench
111+
112+
import org.openjdk.jmh.annotations.*
113+
import java.util.concurrent.TimeUnit
114+
115+
@BenchmarkMode(Array(Mode.AverageTime))
116+
@OutputTimeUnit(TimeUnit.NANOSECONDS)
117+
@Warmup(iterations = 1, time = 100, timeUnit = TimeUnit.MILLISECONDS)
118+
@Measurement(iterations = 10, time = 100, timeUnit = TimeUnit.MILLISECONDS)
119+
@Fork(0)
120+
class Benchmarks {
121+
@Benchmark
122+
def foo(): Unit = {
123+
(1L to 1000L).sum
124+
}
125+
}
126+
```
127+
128+
Expect more improvements in this area in the future.
129+
Also, do play with it and give us feedback about the current implementation!
130+
131+
Added by [@Gedochao](https://github.com/Gedochao) in [#3091](https://github.com/VirtusLab/scala-cli/pull/3091) and [#3118](https://github.com/VirtusLab/scala-cli/pull/3118).
132+
133+
### Support for auto-completions in `fish`
134+
We now have command line auto-completions for the `fish` shell.
135+
136+
Added by [@KristianLentino99](https://github.com/KristianLentino99) in [#3104](https://github.com/VirtusLab/scala-cli/pull/3104).
137+
138+
### `--js-es-module-import-map` no longer requires `--power` mode
139+
A bit of a minor thing, but you can now use the `--js-es-module-import-map` option without enabling `--power` mode.
140+
141+
Added by [@Gedochao](https://github.com/Gedochao) in [#3086](https://github.com/VirtusLab/scala-cli/pull/3086).
142+
143+
### Features
144+
* Add support for exporting to a Maven project by [@yadavan88](https://github.com/yadavan88) in [#3003](https://github.com/VirtusLab/scala-cli/pull/3003)
145+
* improvement: allow to run main class from deps with no inputs by [@kasiaMarek](https://github.com/kasiaMarek) in [#3079](https://github.com/VirtusLab/scala-cli/pull/3079)
146+
* Promote `--js-es-module-import-map` to stable by [@Gedochao](https://github.com/Gedochao) in [#3086](https://github.com/VirtusLab/scala-cli/pull/3086)
147+
* Tweak benchmarking with JMH by [@Gedochao](https://github.com/Gedochao) in [#3091](https://github.com/VirtusLab/scala-cli/pull/3091)
148+
* Add support for fish auto-completions by [@KristianLentino99](https://github.com/KristianLentino99) in [#3104](https://github.com/VirtusLab/scala-cli/pull/3104)
149+
* Add directives for JMH by [@Gedochao](https://github.com/Gedochao) in [#3118](https://github.com/VirtusLab/scala-cli/pull/3118)
150+
151+
### Fixes
152+
* bugfix: Exclude sourcecode dependency by [@tgodzik](https://github.com/tgodzik) in [#3094](https://github.com/VirtusLab/scala-cli/pull/3094)
153+
* bugfix: Exclude both sourcecode and collection-compat correctly by [@tgodzik](https://github.com/tgodzik) in [#3105](https://github.com/VirtusLab/scala-cli/pull/3105)
154+
* Make package command handle directories in extra classpath by [@joan38](https://github.com/joan38) in [#3096](https://github.com/VirtusLab/scala-cli/pull/3096)
155+
* Add extra try-catch clause + extra logging in `LocalRepo` by [@Gedochao](https://github.com/Gedochao) in [#3114](https://github.com/VirtusLab/scala-cli/pull/3114)
156+
* Fix/changing options from sources should not require reload by [@MaciejG604](https://github.com/MaciejG604) in [#3112](https://github.com/VirtusLab/scala-cli/pull/3112)
157+
* fix: remove the --release flag by [@kasiaMarek](https://github.com/kasiaMarek) in [#3119](https://github.com/VirtusLab/scala-cli/pull/3119)
158+
* Remove adding test options to the project/build target name hash by [@MaciejG604](https://github.com/MaciejG604) in [#3107](https://github.com/VirtusLab/scala-cli/pull/3107)
159+
160+
### Internal changes
161+
* Make the `publish` CI job depend on `jvm-tests-5` (Scala 3 Next RC test suite) by [@Gedochao](https://github.com/Gedochao) in [#3078](https://github.com/VirtusLab/scala-cli/pull/3078)
162+
* Include scanning the `.exe` launcher in the release procedure by [@Gedochao](https://github.com/Gedochao) in [#3081](https://github.com/VirtusLab/scala-cli/pull/3081)
163+
* refactor: Switch to original fork of Bloop by [@tgodzik](https://github.com/tgodzik) in [#3020](https://github.com/VirtusLab/scala-cli/pull/3020)
164+
* Extract used Java versions to constants by [@Gedochao](https://github.com/Gedochao) in [#3087](https://github.com/VirtusLab/scala-cli/pull/3087)
165+
* NIT Extract bsp testing utils to a helper trait by [@Gedochao](https://github.com/Gedochao) in [#3092](https://github.com/VirtusLab/scala-cli/pull/3092)
166+
* Fix/simplify code by [@MaciejG604](https://github.com/MaciejG604) in [#3106](https://github.com/VirtusLab/scala-cli/pull/3106)
167+
168+
### Documentation changes
169+
* Add more env vars & generate reference docs for them by [@Gedochao](https://github.com/Gedochao) in [#3075](https://github.com/VirtusLab/scala-cli/pull/3075)
170+
171+
### Updates
172+
* Update scala-cli.sh launcher for 1.4.3 by [@github-actions](https://github.com/github-actions) in [#3073](https://github.com/VirtusLab/scala-cli/pull/3073)
173+
* Update bloop-config_2.13 to 2.0.3 by [@scala-steward](https://github.com/scala-steward) in [#3072](https://github.com/VirtusLab/scala-cli/pull/3072)
174+
* Update Scala toolkit to 0.5.0 by [@Gedochao](https://github.com/Gedochao) in [#3076](https://github.com/VirtusLab/scala-cli/pull/3076)
175+
* Update Typelevel toolkit to 0.1.27 by [@Gedochao](https://github.com/Gedochao) in [#3077](https://github.com/VirtusLab/scala-cli/pull/3077)
176+
* Update Scala 3 Next RC to 3.5.0-RC7 by [@Gedochao](https://github.com/Gedochao) in [#3080](https://github.com/VirtusLab/scala-cli/pull/3080)
177+
* Update bloop-rifle_2.13 to 2.0.0 by [@scala-steward](https://github.com/scala-steward) in [#3108](https://github.com/VirtusLab/scala-cli/pull/3108)
178+
* Update munit to 1.0.1 by [@scala-steward](https://github.com/scala-steward) in [#3100](https://github.com/VirtusLab/scala-cli/pull/3100)
179+
* Update Scala 3 Next to 3.5.0 by [@Gedochao](https://github.com/Gedochao) in [#3093](https://github.com/VirtusLab/scala-cli/pull/3093)
180+
* Update sttp to 3.9.8 by [@scala-steward](https://github.com/scala-steward) in [#3098](https://github.com/VirtusLab/scala-cli/pull/3098)
181+
* Update guava to 33.3.0-jre by [@scala-steward](https://github.com/scala-steward) in [#3113](https://github.com/VirtusLab/scala-cli/pull/3113)
182+
* Update slf4j-nop to 2.0.16 by [@scala-steward](https://github.com/scala-steward) in [#3101](https://github.com/VirtusLab/scala-cli/pull/3101)
183+
* Update Scala 3 Next RC to 3.5.1-RC2 by [@scala-steward](https://github.com/scala-steward) in [#3099](https://github.com/VirtusLab/scala-cli/pull/3099)
184+
* Update Scala Native to 0.5.5 by [@Gedochao](https://github.com/Gedochao) in [#3117](https://github.com/VirtusLab/scala-cli/pull/3117)
185+
* Update os-lib to 0.10.4 by [@scala-steward](https://github.com/scala-steward) in [#3121](https://github.com/VirtusLab/scala-cli/pull/3121)
186+
* Update mill-main to 0.11.12 by [@scala-steward](https://github.com/scala-steward) in [#3120](https://github.com/VirtusLab/scala-cli/pull/3120)
187+
188+
## New Contributors
189+
* @KristianLentino99 made their first contribution in [#3104](https://github.com/VirtusLab/scala-cli/pull/3104)
190+
191+
**Full Changelog**: https://github.com/VirtusLab/scala-cli/compare/v1.4.3...v1.5.0
192+
11193
## [v1.4.3](https://github.com/VirtusLab/scala-cli/releases/tag/v1.4.3)
12194

13195
This release is a hotfix for v1.4.2, which due to technical difficulties was not released to Maven Central

0 commit comments

Comments
 (0)