Skip to content

Commit 1fee08e

Browse files
GedochaoSethTisue
andauthored
Add release notes for v1.14.0 (#4270)
Add release notes for Scala CLI v1.14.0 --------- Co-authored-by: Seth Tisue <seth@tisue.net>
1 parent 5467b23 commit 1fee08e

1 file changed

Lines changed: 140 additions & 0 deletions

File tree

website/docs/release_notes.md

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

99
# Release notes
1010

11+
## [v1.14.0](https://github.com/VirtusLab/scala-cli/releases/tag/v1.14.0)
12+
13+
### Change default Scala Native version to 0.5.11
14+
This Scala CLI version switches the default Scala Native version to [0.5.11](https://github.com/scala-native/scala-native/releases/tag/v0.5.11).
15+
16+
Added by [@Gedochao](https://github.com/Gedochao) in [#4253](https://github.com/VirtusLab/scala-cli/pull/4253)
17+
18+
### Support for `.test.java`
19+
`*.test.java` files are now picked up as test-scope sources automatically, mirroring `*.test.scala`.
20+
Under the hood, Scala CLI generates a matching `.java` source (so `Example.test.java` generates a matching `Example.java` source), so that `javac` accepts the public class.
21+
22+
```java title=java-junit-example/ExampleTest.test.java
23+
//> using test.dep junit:junit:4.13.2
24+
//> using test.dep com.novocode:junit-interface:0.11
25+
import org.junit.Test;
26+
import static org.junit.Assert.assertEquals;
27+
28+
public class ExampleTest {
29+
@Test public void foo() { assertEquals(4, 2 + 2); }
30+
}
31+
```
32+
33+
```bash
34+
scala-cli test java-junit-example
35+
```
36+
37+
Added by [@Gedochao](https://github.com/Gedochao) in [#4261](https://github.com/VirtusLab/scala-cli/pull/4261)
38+
39+
### A toggle to turn auto-IDE-setup off
40+
Build commands (such as `compile`, `run`, `test`) automatically write the BSP configuration under `.bsp/` to keep IDE integration in sync.
41+
This behavior can now be disabled per-invocation via `--auto-setup-ide=false`, or globally via the `ide.auto-setup` `config` key.
42+
43+
```bash
44+
scala-cli compile java-junit-example --auto-setup-ide=false
45+
# Compile without generating .bsp/ configuration
46+
```
47+
48+
```bash ignore
49+
scala-cli config ide.auto-setup false
50+
# Disable auto-setup-ide globally for all build commands
51+
```
52+
53+
Added by [@Gedochao*](https://github.com/Gedochao*) in [#4258](https://github.com/VirtusLab/scala-cli/pull/4258)
54+
55+
### New `directives-parser` module
56+
The legacy Java `using_directives` parser has been replaced with a Scala-rewritten `directives-parser` module.
57+
This is transparent to users, but resolves long-standing directive parsing issues
58+
([#2443](https://github.com/VirtusLab/scala-cli/issues/2443),
59+
[#3019](https://github.com/VirtusLab/scala-cli/issues/3019),
60+
[#2382](https://github.com/VirtusLab/scala-cli/issues/2382))
61+
and unblocks future improvements to directive handling.
62+
63+
The directives parser can be used as a standalone library, so you can now parse `using` directives in your own tools and applications with the same logic as Scala CLI.
64+
```scala
65+
//> using scala 3
66+
//> using dep org.virtuslab.scala-cli::directives-parser:latest.integration
67+
import scala.cli.parse.UsingDirectivesParser
68+
69+
@main def parseDirectives(): Unit =
70+
val source =
71+
"""//> using scala 3.8.3
72+
|//> using dep com.lihaoyi::os-lib:0.11.9-M7
73+
|//> using options -Wunused:all -deprecation
74+
|
75+
|@main def hello() = println("Hello")
76+
|""".stripMargin
77+
78+
val result = UsingDirectivesParser.parse(source.toCharArray)
79+
80+
for d <- result.directives do
81+
val values = d.values.map(_.stringValue).mkString(", ")
82+
println(s"${d.key} = $values (line ${d.keyPosition.line})")
83+
84+
if result.diagnostics.nonEmpty then
85+
println("Diagnostics:")
86+
result.diagnostics.foreach(println)
87+
```
88+
89+
```text
90+
scala = 3.8.3 (line 0)
91+
dep = com.lihaoyi::os-lib:0.11.9-M7 (line 1)
92+
options = -Wunused:all, -deprecation (line 2)
93+
```
94+
95+
Added by [@Gedochao](https://github.com/Gedochao) in [#4192](https://github.com/VirtusLab/scala-cli/pull/4192)
96+
97+
### Typelevel Toolkit 0.2.0 (with Scala Native)
98+
The Typelevel Toolkit dependency has been bumped to 0.2.0 and is now compatible with Scala Native 0.5.x.
99+
It's worth mentioning that its test framework has been swapped from MUnit to Weaver.
100+
101+
```scala compile title=HelloSuite.test.scala
102+
//> using toolkit typelevel:default
103+
//> using platform native
104+
105+
import cats.effect.*
106+
import weaver.*
107+
108+
object HelloSuite extends SimpleIOSuite:
109+
test("hello") {
110+
IO("Hello").map(expect.eql(_, "Hello"))
111+
}
112+
```
113+
114+
Added by [@Gedochao](https://github.com/Gedochao) in [#4244](https://github.com/VirtusLab/scala-cli/pull/4244)
115+
116+
### Features
117+
* Migrate from old `using_directives` to Scala-rewritten `directives-parser` module by [@Gedochao](https://github.com/Gedochao) in [#4192](https://github.com/VirtusLab/scala-cli/pull/4192)
118+
* Allow to disable auto-setup-ide in build commands with a command line option & config by [@Gedochao](https://github.com/Gedochao) in [#4258](https://github.com/VirtusLab/scala-cli/pull/4258)
119+
* Support for `.test.java` by [@Gedochao](https://github.com/Gedochao) in [#4261](https://github.com/VirtusLab/scala-cli/pull/4261)
120+
121+
### Fixes
122+
* Prevent duplicate `publish.credentials` and `repositories.credentials` from being saved to the config database by [@Gedochao](https://github.com/Gedochao) in [#4257](https://github.com/VirtusLab/scala-cli/pull/4257)
123+
124+
### Build and internal changes
125+
* Fix `scala-cli-archive-keyring.gpg` generation; auto generate `KEY.gpg` for `scala-cli-packages` by [@Gedochao](https://github.com/Gedochao) in [#4238](https://github.com/VirtusLab/scala-cli/pull/4238)
126+
* Fix `sclicheck.GifTests.complete-install` timing out by [@Gedochao](https://github.com/Gedochao) in [#4236](https://github.com/VirtusLab/scala-cli/pull/4236)
127+
* Split the `update-packages` CI job down into individual targets by [@Gedochao](https://github.com/Gedochao) in [#4259](https://github.com/VirtusLab/scala-cli/pull/4259)
128+
* Add explicit overrides in ScalaCliScalafixModule by [@Gedochao](https://github.com/Gedochao) in [#4267](https://github.com/VirtusLab/scala-cli/pull/4267)
129+
130+
### Documentation changes
131+
* Fix docs & add tests for `repositories.mirrors` & `repositories.default` by [@Gedochao](https://github.com/Gedochao) in [#4235](https://github.com/VirtusLab/scala-cli/pull/4235)
132+
133+
### Updates
134+
* Update scala-cli.sh launcher for 1.13.0 by @github-actions[bot] in [#4232](https://github.com/VirtusLab/scala-cli/pull/4232)
135+
* Bump @algolia/client-search from 5.50.1 to 5.50.2 in /website in the npm-dependencies group by @dependabot[bot] in [#4242](https://github.com/VirtusLab/scala-cli/pull/4242)
136+
* Bump @algolia/client-search from 5.50.2 to 5.51.0 in /website in the npm-dependencies group by @dependabot[bot] in [#4247](https://github.com/VirtusLab/scala-cli/pull/4247)
137+
* Bump postcss from 8.5.6 to 8.5.12 in /website by @dependabot[bot] in [#4248](https://github.com/VirtusLab/scala-cli/pull/4248)
138+
* Bump the npm-dependencies group in /website with 5 updates by @dependabot[bot] in [#4251](https://github.com/VirtusLab/scala-cli/pull/4251)
139+
* Bump Mill to 1.1.6 (was 1.1.5) by [@Gedochao](https://github.com/Gedochao) in [#4254](https://github.com/VirtusLab/scala-cli/pull/4254)
140+
* Bump Scala Native to 0.5.11 (was 0.5.10) by [@Gedochao](https://github.com/Gedochao) in [#4253](https://github.com/VirtusLab/scala-cli/pull/4253)
141+
* Bump Scala 3 Next RC to 3.8.4-RC2 by [@Gedochao](https://github.com/Gedochao) in [#4243](https://github.com/VirtusLab/scala-cli/pull/4243)
142+
* Bump fast-uri from 3.1.0 to 3.1.2 in /website by @dependabot[bot] in [#4263](https://github.com/VirtusLab/scala-cli/pull/4263)
143+
* Bump @babel/plugin-transform-modules-systemjs from 7.28.5 to 7.29.4 in /website by @dependabot[bot] in [#4264](https://github.com/VirtusLab/scala-cli/pull/4264)
144+
* Bump the npm-dependencies group in /website with 3 updates by @dependabot[bot] in [#4265](https://github.com/VirtusLab/scala-cli/pull/4265)
145+
* Bump Typelevel Toolkit to 0.2.0 and enable it for Scala Native 0.5.* by [@Gedochao](https://github.com/Gedochao) in [#4244](https://github.com/VirtusLab/scala-cli/pull/4244)
146+
* Bump Scala toolkit to 0.9.2 (was 0.8.0) by [@Gedochao](https://github.com/Gedochao) in [#4268](https://github.com/VirtusLab/scala-cli/pull/4268)
147+
* Bump coursier to 2.1.25-M25 by [@Gedochao](https://github.com/Gedochao) in [#4266](https://github.com/VirtusLab/scala-cli/pull/4266)
148+
149+
**Full Changelog**: https://github.com/VirtusLab/scala-cli/compare/v1.13.0...v1.14.0
150+
11151
## [v1.13.0](https://github.com/VirtusLab/scala-cli/releases/tag/v1.13.0)
12152

13153
### Change default Scala version to 3.8.3

0 commit comments

Comments
 (0)