Scala CLI

scala-cli@virtuslab.com · VirtusLab.ScalaCLI

Scala CLI is a command-line tool to interact with the Scala language.

winget install --id VirtusLab.ScalaCLI --exact --source winget

Latest 1.14.0

Release Notes

Change default Scala Native version to 0.5.11 This Scala CLI version switches the default Scala Native version to 0.5.11. Added by @Gedochao in #4253 Support for .test.java *.test.java files are now picked up as test-scope sources automatically, mirroring *.test.scala. 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. //> using test.dep junit:junit:4.13.2 //> using test.dep com.novocode:junit-interface:0.11 import org.junit.Test; import static org.junit.Assert.assertEquals; public class ExampleTest { @Test public void foo() { assertEquals(4, 2 + 2); } } scala-cli test java-junit-example Added by @Gedochao in #4261. A toggle to turn auto-IDE-setup off Build commands (such as compile, run, test) automatically write the BSP configuration under .bsp/ to keep IDE integration in sync. This behavior can now be disabled per-invocation via --auto-setup-ide=false, or globally via the ide.auto-setup config key. scala-cli compile java-junit-example --auto-setup-ide=false

Compile without generating .bsp/ configuration

scala-cli config ide.auto-setup false

Disable auto-setup-ide globally for all build commands

Added by @Gedochao in #4258. New directives-parser module The legacy Java using_directives parser has been replaced with a Scala-rewritten directives-parser module. This is transparent to users, but resolves long-standing directive parsing issues (#2443, #3019, #2382) and unblocks future improvements to directive handling. 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. //> using scala 3 //> using dep org.virtuslab.scala-cli::directives-parser:1.14.0 import scala.cli.parse.UsingDirectivesParser @main def parseDirectives(): Unit = val source = """//> using scala 3.7.4 |//> using dep com.lihaoyi::os-lib:0.11.4 |//> using options -Wunused:all -deprecation | |@main def hello() = println("Hello") |""".stripMargin val result = UsingDirectivesParser.parse(source.toCharArray) for d <- result.directives do val values = d.values.map(.stringValue).mkString(", ") println(s"${d.key} = $values (line ${d.keyPosition.line})") if result.diagnostics.nonEmpty then println("Diagnostics:") result.diagnostics.foreach(println) Added by @Gedochao in #4192. Typelevel Toolkit 0.2.0 (with Scala Native) The Typelevel Toolkit dependency has been bumped to 0.2.0 and is now compatible with Scala Native 0.5.x. It's worth mentioning that its test framework has been swapped from MUnit to Weaver. //> using toolkit typelevel:default //> using platform native import cats.effect.* import weaver.* object HelloSuite extends SimpleIOSuite: test("hello") { IO("Hello").map(expect.eql(, "Hello")) } Added by @Gedochao in #4244. Features

  • Migrate from old using_directives to Scala-rewritten directives-parser module by @Gedochao in #4192
  • Allow to disable auto-setup-ide in build commands with a command line option & config by @Gedochao in #4258
  • Support for .test.java by @Gedochao in #4261 Fixes
  • Prevent duplicate publish.credentials and repositories.credentials from being saved to the config database by @Gedochao in #4257 Build and internal changes
  • Fix scala-cli-archive-keyring.gpg generation; auto generate KEY.gpg for scala-cli-packages by @Gedochao in #4238
  • Fix sclicheck.GifTests.complete-install timing out by @Gedochao in #4236
  • Split the update-packages CI job down into individual targets by @Gedochao in #4259
  • Add explicit overrides in ScalaCliScalafixModule by @Gedochao in #4267 Documentation changes
  • Fix docs & add tests for repositories.mirrors & repositories.default by @Gedochao in #4235 Updates
  • Update scala-cli.sh launcher for 1.13.0 by @github-actions[bot] in #4232
  • Bump @algolia/client-search from 5.50.1 to 5.50.2 in /website in the npm-dependencies group by @dependabot[bot] in #4242
  • Bump @algolia/client-search from 5.50.2 to 5.51.0 in /website in the npm-dependencies group by @dependabot[bot] in #4247
  • Bump postcss from 8.5.6 to 8.5.12 in /website by @dependabot[bot] in #4248
  • Bump the npm-dependencies group in /website with 5 updates by @dependabot[bot] in #4251
  • Bump Mill to 1.1.6 (was 1.1.5) by @Gedochao in #4254
  • Bump Scala Native to 0.5.11 (was 0.5.10) by @Gedochao in #4253
  • Bump Scala 3 Next RC to 3.8.4-RC2 by @Gedochao in #4243
  • Bump fast-uri from 3.1.0 to 3.1.2 in /website by @dependabot[bot] in #4263
  • Bump @babel/plugin-transform-modules-systemjs from 7.28.5 to 7.29.4 in /website by @dependabot[bot] in #4264
  • Bump the npm-dependencies group in /website with 3 updates by @dependabot[bot] in #4265
  • Bump Typelevel Toolkit to 0.2.0 and enable it for Scala Native 0.5.* by @Gedochao in #4244
  • Bump Scala toolkit to 0.9.2 (was 0.8.0) by @Gedochao in #4268
  • Bump coursier to 2.1.25-M25 by @Gedochao in #4266 Full Changelog: v1.13.0...v1.14.0

Installer type: wix

Architecture Scope Download SHA256
x86 Download D35B346D52CB53BABBA945FAED7E6D5C7F7EFB4062C14C454161CF61ED5E10DE

Details

Homepage
https://github.com/VirtusLab/scala-cli
License
Apache-2.0
Publisher
scala-cli@virtuslab.com
Support
https://github.com/VirtusLab/scala-cli/issues

Tags

functionaljavalanguageprogrammingscala

Older versions (45)

1.13.0
Architecture Scope Download SHA256
x86 Download 3DB774780AD73E149EFDEB2823B29E232C4CAFABF1B4CA6C2E24E8EE36E81EB1
1.12.5
Architecture Scope Download SHA256
x86 Download BD0CEDAED4D891BC3D78F7EE4C9FCC330E0D5A952A8D7909FA1990E2DBE38F39
1.12.4
Architecture Scope Download SHA256
x86 Download 1D8BF7552D27E7E6C2BF7CFF2C6AF642BFA2D2E7F3227471948B49301AF06BAB
1.12.3
Architecture Scope Download SHA256
x86 Download 491932C0E3D4F5EB84E9172541FDC6485962E36786B4E7A73684E6D4A84D55D4
1.12.2
Architecture Scope Download SHA256
x86 Download A0F5396CF3BA3F4DC8A854E19CD4E55E92DC0D9F229A1DD70A1AFB83D5BD2847
1.12.1
Architecture Scope Download SHA256
x86 Download 61C867D10987A22D62A8478983F82FD1045F6BFE2838BB30ECAD0940325353E2
1.12.0
Architecture Scope Download SHA256
x86 Download C3863D083E1A1D07469F08DBB938D6E21A633D2F60EB0462F7881F587AA9C5D2
1.11.0
Architecture Scope Download SHA256
x64 Download E4DFB66FE58872D0DDE437A5C3827DA9640BC2ED386923043CE53A067DE4C16B
1.10.1
Architecture Scope Download SHA256
x86 Download 49D10F4858BA3961A424D364C103C0B5AECDBA74817B74BB48FE1598EB345EBE
1.9.1
Architecture Scope Download SHA256
x86 Download D23C0686637D5AB032CBCDB566917D6D3434E5040816CC603591C5DF61330D21
1.9.0
Architecture Scope Download SHA256
x86 Download 4CCA75C943C90846A7030D7491B61930E4C39BF61098BF5DA80CDDE63CEBA84A
1.8.5
Architecture Scope Download SHA256
x86 Download 2A5D84EA7F446F504B626C32E0630B9C45E46638D1B0B8E3830C04A0305E5BC6
1.8.4
Architecture Scope Download SHA256
x86 Download E1734F7A88F7CC2D771D52B445F75BF1E56B8732FF829318E5A859BE28C2E1A3
1.8.3
Architecture Scope Download SHA256
x86 Download F2FA21E68FC80E194A2464D959A6CE1A48C31001ACAE2C338F681C18F5B869F0
1.8.2
Architecture Scope Download SHA256
x64 Download 2D7B3F8A1F838AAF93EDF75C7A235741DBBA24832B942D8B403ADD5374EB6824
1.8.1
Architecture Scope Download SHA256
x64 Download 0E2C69A420405EF8A9B907E95C98994C9D0CEB0852BF7FE18194B593BC81166F
1.8.0
Architecture Scope Download SHA256
x64 Download B8505A2B1F751E6826A4B10356AB3817E070D52C01D6D3249CC2A1719DBBAAF4
1.7.1
Architecture Scope Download SHA256
x64 Download A9A08F54726F9A6A3C4C500C8AB55B31015FCDE93F79107FF3F686B26BBB4EB1
1.7.0
Architecture Scope Download SHA256
x64 Download 0BC95DBCFF789786CD5C05EF4DDC672E9ABA8BBE7D15D54DE62DE84DB5694D57
1.6.2
Architecture Scope Download SHA256
x64 Download 57B23582C0EBEB85C619BFBD47A2AD15CBC41BAD4A000C20D44F75F1C918C68F
1.6.1
Architecture Scope Download SHA256
x64 Download B1954B8D09ACF3074482CC534C24963C407AEEE08D6DD399A0B9398B548B568E
1.6.0
Architecture Scope Download SHA256
x64 Download 329D6D2A8EC12F4FF3329B10BF466ED604531EF958BBC5F507A5CF673D0ACBCA
1.5.4
Architecture Scope Download SHA256
x64 Download 0881CDFB39F06341D4D6519D10072CFDC5E39B01BD91B2A23CE8D8281D3FB4D1
1.5.3
Architecture Scope Download SHA256
x64 Download B570E0B2E7B089BDA419C1D9D00B2604D8C9569B97ABDEE7F2B354DB6A6ACA02
1.5.1
Architecture Scope Download SHA256
x64 Download FD0B0BC3A1FA14922FE54C1BE5CD93BF88D0D657A7454F6E58D56CA581BD66B2
1.5.0
Architecture Scope Download SHA256
x64 Download 7C7511F91207A532F77633FF62BAD101BE2F215CDCFFBE3FB05612F196334E00
1.4.2
Architecture Scope Download SHA256
x64 Download 0B1D4044804AE4B9E767E9869EC735F891E0F3E772B500FB0A8D356DAA7F09B4
1.4.1
Architecture Scope Download SHA256
x64 Download BFF20328B7F0CFCBFFD3F6ADCA14285CA52F4F5BE0D516C17BB51D2791F647FD
1.4.0
Architecture Scope Download SHA256
x64 Download 6E344B743EB4BFAD1A245800E59C06108DF8EAC46C6958607C42B8B40406D326
1.3.2
Architecture Scope Download SHA256
x64 Download 2E7A0CF15F1E3897FE10AB132450C99BD6622E885466F04C3215C0F9AD028955
1.3.1
Architecture Scope Download SHA256
x64 Download A9090910C32B944B6D360B28D405B77E4C7F75CA6A84BC19835BA28358842ABC
1.3.0
Architecture Scope Download SHA256
x64 Download 211A5099F43B28B10D14A6C8C5747437D9ED3C894ED28521EEC7865C8EF74B9A
1.2.2
Architecture Scope Download SHA256
x64 Download 3263E96FDCF1E855A38BAB8EB5680287DEDB7ACA4674C17A063DC38A269FFFB7
1.2.1
Architecture Scope Download SHA256
x64 Download F6601DF2E5CE9AD82989D0432171951181508CEE35F498C4263073BB53D36E34
1.2.0
Architecture Scope Download SHA256
x64 Download 1BF94318E9CEE1E0B5E4A8EDCFFBC0FDE20A724F79C1B76496C25B8C1C2241F2
1.1.3
Architecture Scope Download SHA256
x64 Download 70FEE9E53319C99C276360862A9EEFC7D43463B32100DF6BFCFA1DCAC3A4ED9F
1.1.2
Architecture Scope Download SHA256
x64 Download 36742FB0CB42038A15C369655129F6A68C92F013435623250B340C69E835F3BE
1.1.1
Architecture Scope Download SHA256
x64 Download FC4AE2B0BE914DDEF7F11033AE20701D0369F3457A0A6AA23D22E7C0EE665ACE
1.1.0
Architecture Scope Download SHA256
x64 Download F72AB8D92150C522D1A01C239485E56CB4A275B1C4E5584E9CB40EEB253F98A9
1.0.6
Architecture Scope Download SHA256
x64 Download 901E2AF7CC362793545CE4149C9169CE486CE2BAA533BE5260DE996CAC0E38C5
1.0.5
Architecture Scope Download SHA256
x64 Download 082C7BA085F76ADD972988E25008DB831C8DA841AD8F689F81BF4F928C19BCA7
1.0.4
Architecture Scope Download SHA256
x64 Download 094F74A41A5B9A7F754AAA22A4EFDD4C8755B23C2C8633BAF5E36952369A7A93
1.0.3
Architecture Scope Download SHA256
x64 Download 30E4025BD03806C7A8EB5FECD8929431A85593AD6BAB36074D434E0D6DCCBEC3
1.0.2
Architecture Scope Download SHA256
x64 Download D5C0CAD2B2CF9490CC3A95C5330DAC64C9A6D914D58AE6147498DF7D641DE1AF
1.0.1
Architecture Scope Download SHA256
x64 Download 5B9B61D96A893C2BC37C9171C22C5C17E91A1C0B71DF40DA38D817F8E138D210