v1.0.5
What's new
Accept --power
from anywhere
The --power
flag used to be a launcher option, which means it used to only be accepted when passed before the sub-command name. Now, it can be passed anywhere in the command line.
scala-cli --power package --help
scala-cli package --power --help
scala-cli package --help --power
Added by @MaciejG604 in #2399
Offline mode (experimental)
It is now possible to run Scala CLI in offline mode for the cases when you don't want the runner
to make any network requests for whatever reason.
This changes Coursier's cache policy to LocalOnly
, preventing it from downloading anything.
scala-cli . --offline
Of course, this means that you will have to have all the dependencies relevant to your build already downloaded and available in your local cache.
Reasonable fallbacks will be used where possible, e.g. the Scala compiler may be used instead of Bloop if Bloop isn't available.
Added by @MaciejG604 in #2404
Shorter install script link
Scala CLI's install script is now available behind a conveniently shorter web address:
https://scala-cli.virtuslab.org/get
The fix
sub-command (experimental)
The fix
sub-command is a new addition to Scala CLI. It allows to scan your project for using
directives and extract them into the project.scala
file placed in the project root directory.
This allows to easily fix warnings tied to having using
directives present in multiple files.
scala-cli fix . --power
Added by @MaciejG604 in #2309
Support for building static & shared libraries with Scala Native (experimental)
You can now use the --native-target
option to build Scala Native projects as static or shared libraries.
scala-cli package . --power --native-target static
scala-cli package . --power --native-target dynamic
Print platform version
Platform version is now always logged during compilation.
scala-cli compile .
# Compiling project (Scala 3.3.1, JVM (17))
# Compiled project (Scala 3.3.1, JVM (17))
scala-cli compile . --js
# Compiling project (Scala 3.3.1, Scala.js 1.13.2)
# Compiled project (Scala 3.3.1, Scala.js 1.13.2)
scala-cli compile . --native
# Compiling project (Scala 3.3.1, Scala Native 0.4.16)
# Compiled project (Scala 3.3.1, Scala Native 0.4.16)
Other changes
Enhancements
- Accumulate exp warnings with logger by @MaciejG604 in #2376
- Remove ComputeVersion.Command, make ComputeVersion classes positioned by @MaciejG604 in #2350
- Add more configuration for publish by @MaciejG604 in #2435
- Warn about transitive using file directive by @MaciejG604 in #2432
- Support Scala Native 0.5.x changes in publishing artifacts by @WojciechMazur in #2460
Fixes
- Fix - set es version into scala-js-cli by @lwronski in #2351
- Modify the format of StrictDirective.toString by @MaciejG604 in #2355
- Make explicitly passed scala version use the latest release, not the default one by @MaciejG604 in #2411
- Release flag by @lwronski in #2413
- Ensure build resolution is kept when packaging assemblies with provided dependencies by @Gedochao in #2457
- Fix
fmt
sub-command exit code to mirrorscalafmt
by @Gedochao in #2463 - Fix 'JVM too old' as bsp by @MaciejG604 in #2445
- Read java props from env vars by @MaciejG604 in #2356
- Make script wrapper satisfy compiler checks by @MaciejG604 in #2414
- Load local ivy path from ivy.home and user.home system properties by @JD557 in #2484
Documentation changes
- Fix typo in buildInfo directive docs by @izzyreal in #2357
- configuration.md examples "using dep" to current versions by @SunKing2 in #2398
- Documentation updates by @MaciejG604 in #2375
- Fix publish directives usage displayed in one line, unify directive docs by @MaciejG604 in #2381
- Backport of docs change (#2391) by @MaciejG604 in #2403
- Add internal docs for scalajs-cli by @lwronski in #2434
- Add docs for fix command by @MaciejG604 in #2437
- Add docs for offline mode by @MaciejG604 in #2475
- Update dependencies.md to mention jitpack by @doofin in #2458
- Update the list of external repositories Scala CLI depends on by @Gedochao in #2476
- Update the docs to no longer treat --power as a launcher-only option by @Gedochao in #2478
Build and internal changes
- Add test for actionable diagnostics from compiler by @MaciejG604 in #2327
- Pin the versions of Github CI runners by @MaciejG604 in #2370
- Remove bloop timeouts in tests by @MaciejG604 in #2407
- Add post-update hook for reference doc generation by @MaciejG604 in #2406
- Add tests which check availability of scalafmt native launcher for de… by @lwronski in #2418
- Default to a Scala version for REPL if there are no Scala artifacts. by @trilleplay in #2431
- Remove unused snippet checker by @lwronski in #2423
- Allow to override internal & user default Scala versions for
mill
builds by @Gedochao in #2461 - NIT: Refactor: Rely on global --power option where able in cli commands by @Gedochao in #2480
Updates and maintenance
- Update scala-cli.sh launcher for 1.0.4 by @github-actions in #2344
- Update bloop-rifle_2.13 to 1.5.9-sc-2 by @lwronski in #2345
- Update core_2.13 to 3.9.0 by @scala-steward in #2346
- Update sbt to 1.9.3 by @scala-steward in #2349
- Bump VirtusLab/scala-cli-setup from 1.0.2 to 1.0.4 by @dependabot in #2348
- Update coursier-jvm_2.13, ... to 2.1.6 by @scala-steward in #2360
- Update trees_2.13 to 4.8.9 by @scala-steward in #2369
- Update scalafmt-cli_2.13, scalafmt-core to 3.7.13 by @scala-steward in #2368
- Update bloop-rifle_2.13 to 1.5.11-sc-1 by @scala-steward in #2383
- Update org.eclipse.jgit to 6.6.1.202309021850-r by @scala-steward in #2384
- Update trees_2.13 to 4.8.10 by @scala-steward in #2387
- Update coursier-jvm_2.13, ... to 2.1.7 by @scala-steward in #2393
- Bump docker/login-action from 2 to 3 by @dependabot in #2400
- Update org.eclipse.jgit to 6.7.0.202309050840-r by @scala-steward in #2395
- Update scala3-library to 3.3.1 by @scala-steward in #2392
- Update slf4j-nop to 2.0.9 by @scala-steward in #2388
- Update file-tree-views to 2.1.11 by @scala-steward in #2410
- Update test-runner, tools to 0.4.15 by @scala-steward in #2385
- Update scala-library to 2.13.12 by @scala-steward in #2396
- Update scalafmt-cli_2.13, scalafmt-core to 3.7.14 by @scala-steward in #2386
- Update file-tree-views to 2.1.12 by @scala-steward in #2419
- Update bsp4j to 2.1.0-M6 by @scala-steward in #2401
- Update trees_2.13 to 4.8.11 by @scala-steward in #2429
- Update asm to 9.6 by @scala-steward in #2442
- Update bsp4j to 2.1.0-M7 by @scala-steward in #2438
- Update metaconfig-typesafe-config to 0.12.0 by @scala-steward in #2439
- Update ammonite to 3.0.0-M0-56-1bcbe7f6 by @scala-steward in #2440
- Bump Scala Native to 0.4.16 & log platform version by @Gedochao in #2465
- Update guava to 32.1.3-jre by @scala-steward in #2467
- Update trees_2.13 to 4.8.12 by @scala-steward in #2468
- Bump actions/checkout from 3 to 4 by @dependabot in #2378
- Bump coursier/setup-action from 1.3.3 to 1.3.4 by @dependabot in #2424
- Bump coursier-publish from 0.1.4 to 0.1.5 by @MaciejG604 in #2433
- Bump scalajs-cli to 1.14.0 by @MaciejG604 in #2491
- Bump scala-cli-signing to 0.2.3 by @Gedochao in #2486
- Bump gcbenchmark dependencies by @Gedochao in #2481
New Contributors
- @SunKing2 made their first contribution in #2398
- @trilleplay made their first contribution in #2431
- @WojciechMazur made their first contribution in #2460
- @JD557 made their first contribution in #2484
- @doofin made their first contribution in #2458
Full Changelog: v1.0.4...v1.0.5