Scala tooling ecosystem

Tomasz Godzik @ VirtusLab

Tomasz Godzik

Senior Scala Developer

Who am I

Tomasz Godzik

Senior Scala Developer

also

team lead for Scala Ecosystem Team

Open source tooling

Goals for the talk

Show the full scope of the tooling landscape

Increase confidence in the tooling

Show how you can help!

Mention some useful features.

Tooling landscape

What is a tool?

It's not always clear what is the border between tools and libraries.

 

For this presentation, a tool is anything that will not be shipped with your code

 

I am not covering testing frameworks.

And I couldn't cover every tool I wanted :(

Tool

no.

 ❓ Why ❓

Why you might want to use it?

Maintained Is there anything going on in the repo?
Health Are there any blocking issues?
Scala 2/3 Is Scala 2 or 3 supported
Contributing Should I contribute?
New features Are there any new features to talk about?

Tool

no.

Tool

no.

⚙️ Features if there is anything worth mentioning

Scala 2 Compiler

14 257

 ❓ Why ❓

You need to compile Scala 2 code.

Maintained Active development
Health Yes
Contributing Guide + many helpful devs
New features Yes, but minimal

Scala 2 Compiler

14 257

Scala 2 Compiler

14 257

⚙️ Actionable diagnostics for some of the warnings and errors

 

⚙️ Improved migration under -Xsource3

 

⚙️ Smaller features and fixes

Scala 3 Compiler

5566

 ❓ Why ❓

You need to compile Scala 3 code.

Maintained Active development
Health Any breaking bugs fixed quickly
Contributing Guide + many helpful devs
New features Some would say too many

Scala 3 Compiler

5566

Scala 3 Compiler

5566

⚙️ Actionable diagnostics for exhaustive checks 

⚙️ Built-in scoverage and semanticdb support

⚙️ Stable presentation compiler

⚙️ New linting

⚙️ Error codes

 

Metals

2010

  • you want direct information from the Scala 2 and 3 compiler
  • you want to use new features right from the start
  • you want to use different editors

 

 

 ❓ Why ❓

Metals

2010

Maintained Active development
Health Some stability issues
Scala 2/3 support Both
Contributing Guide and many helpful devs
New features Yes

Metals

2010

⚙️ Bazel support released

⚙️ Feature parity between Scala 2 and 3 released

⚙️ Implementations in dependencies coming

⚙️ Inlay hints coming

​⚙️ Work being done on opt in telemetry in progress

 

Coursier

1997

  • You want to manage dependencies both via API or command line
  • You want to use a simple package manager for your app
  • You want to search dependencies and their versions

 ❓ Why ❓

Coursier

1997

Maintained Lacking maintainers
Health No major issues, plenty smaller ones
Scala 2/3 support Both
Contributing Guide
New features No

Almond

1563

 ❓ Why ❓

  • You want to use Jupyter Lab notebooks with Scala
  • You want to use interactive computing such as Spark with Scala

Almond

1563

Maintained Lacking maintainers
Health Hard to guage
Scala 2/3 support Both
Contributing Minimal guide
New features No

Scalafmt

1395

  • you want uniform formatting across the team and you don't want to waste time on reviews
  • you want to use something that is integrated into almost all Scala tooling
  • you want to experiment with different styles

 ❓ Why ❓

Scalafmt

1395

Maintained Active development
Health No issues
Scala 2/3 support Both
Contributing Guide and some helpful devs
New features Yes

Scalafmt

1395

⚙️ optional and fewer braces support

⚙️ numerous bug fixes

⚙️ new settings introduced when necessary

⚙️ up to date with Scala 3 changes

Scala Steward

1118

 ❓ Why ❓

  • you want to keep your dependencies up to date and limit tech debt

Scala Steward

1118

Maintained Mostly maintenance
Health No major issues
Scala 2/3 support Both
Contributing Guide + some helpful devs
New features No

Scala Steward

1118

⚙️ Scala CLI support

⚙️ Public instance run by VirtusLab

⚙️ Can be run on github actions

Scalameta

1086

 ❓ Why ❓

  • you need to parse or generate Scala code
  • you want to get semanticdb information

 

Scalameta

1086

Maintained Active development
Health Smaller issues
Scala 2/3 support Both
Contributing Guide and some helpful devs
New features Yes

Scalameta

1086

⚙️ Most work involves keeping up to date with Scala syntax changes

 

⚙️ Not yet compiled with Scala 3 soon

Wartremover

1064

 ❓ Why ❓

  • You want to improve your codebase to avoid common bugs
  • You want to add non standard linting 

Wartremover

1064

Maintained Maintenance
Health No major
Scala 2/3 support Both
Contributing Guide and gitter channel
New features No

Wartremover

1064

Caveat: Doesn't currently work in Bloop

Scalafix

796

  • You want to use automatic refactorings to improve your codebase
  • You want to implement automatic rewrites.
  • You want to automatically improve your compilation speed

 ❓ Why ❓

Scalafix

796

Maintained Maintenance
Health No major issues
Scala 2/3 support Both
Contributing Dev guide and helpful dev
New features No 

Scalafix

796

Caveat: ExplicitResultTypes don't work for Scala 3

Scala CLI

488

 ❓ Why ❓

  • you want to write a simple application or script
  • you want to have a simple tool for learning or experimenting

Scala CLI

488

Maintained Maintenance
Health Nothing major
Scala 2/3 support Both
Contributing Dev guide and helpful devs
New features Yes, but only minor

Scastie

423

 ❓ Why ❓

  • you don't want to use a physical machine
  • you want to easily share your experiments
  • you want to provide users with examples of your library

Scastie

423

Maintained Active development
Health Some infra issues
Scala 2/3 support Both
Contributing Dev guide and helpful dev
New features Yes

Scastie

423

⚙️ Built-in Metals support for hover and completions

⚙️ Tree sitter syntax highlighting

⚙️ Scala CLI support coming soon

Mdoc

384

 ❓ Why ❓

  • you want to type check or run your documentation
  • you want to enrich your documentation with some more interactive features
  • you want to write custom worksheets

Mdoc

384

Maintained Maintenance
Health No major issues
Scala 2/3 support Both
Contributing Guide and some helpful devs
New features No

Scala Toolkit

80

 ❓ Why ❓

 You want to have a ready set of libraries to use as an enhancement of the standard library

Scala Toolkit

80

Maintained Active dev
Health No major issues
Scala 2/3 support Both
Contributing Not needed
New features Yes

Scala Debug Adapter

54

 ❓ Why ❓

  • you want to debug your code in Metals

Scala Debug Adapter

54

Maintained Active dev
Health Try out an report!
Scala 2/3 support Both
Contributing Dev guide and helpful dev
New features Yes

Scala Debug Adapter

54

⚙️ Hot code reload

 

⚙️ Faster evaluation of simple expressions

 

⚙️ Pretty stack traces

More!

x

  • Intellij
  • scala native
  • scala js
  • ammonite
  • jardiff
  • scalap
  • flamegraph
  • JMH
  • metabrowse
  • community build
  • tasty query
  • tasty inspector

 

  • bloop
  • scoverage
  • laika
  • ZIO Intellij plugin
  • scala dependency submission
  • sbt version policy
  • tasty mima
  • mima
  • sbt plugins
  • scalably typed

 

 

Tooling

  • it's not all bad!
  • can and should be improved
  • it's possible to contribute and help out

 

 

How can we do better?

Please report issues!

Sprees?

 

But, if you want to help or start helping.

 

We can come try and organize sprees together.

 

That can be a great way to share knowledge and start to work on the issues that bug you.

 

But there is more we can do from our side!

Improving reporting

 

We cannot always easily see what is going wrong.

 

Adding self diagnostics and reporting mechanisms, which can than be forwarded to us automatically or manually.

 

Already done in Scastie, soon in Metals opt in.

 

Improving error messages

It's easier to know what is going on if the error message is clear

 

Maybe we can fix it automatically?

Improving error messages

But remember

 

Any feedback is useful! Voice it!

 

Take a look at our roadmap!

Presentation 

Questions?

Social media:

Twitter @TomekGodzik,

Mastodon https://fosstodon.org/@tgodzik  

 

Contact as at VirtusLab: tgodzik@virtuslab.com

Scala Tooling Ecosystem

By Tomek Godzik

Scala Tooling Ecosystem

  • 170