What are tools used for?
Editing, compiling and testing.
Slide 4
Slide 4 text
What are tools used for?
Editing, compiling and testing, ...
learning, experimenting, analysing, reviewing code,
debugging, dependency management, publishing, versioning,
benchmarking, creating other tools, ...
coffee, ...
Slide 5
Slide 5 text
Why do we care ?
Slide 6
Slide 6 text
Why do we care ?
Productivity.
Slide 7
Slide 7 text
No content
Slide 8
Slide 8 text
LSP: Language Server Protocol
The Language Server Protocol defines the protocol used
between an editor or an IDE and a language server that
provides language features like auto complete, go to
definition, find all references, etc.
Slide 9
Slide 9 text
No content
Slide 10
Slide 10 text
No content
Slide 11
Slide 11 text
Language Servers in Scala lang
● Dragos-vscode-scala
● Metals
● Dotty LS
● SBT server (since SBT 1.x)
Slide 12
Slide 12 text
Editors/IDEs supporting the LSP
● IntelliJ
● Eclipse IDE
● VS code
● Atom
● Sublime Text 3
● vim8/neovim
● Emacs
See ls.org and ms.lsp for the latest on adoption.
Slide 13
Slide 13 text
Metals @scalameta
Slide 14
Slide 14 text
Metals
Works with: vs-code, atom, vim, Sublime text 3, Emacs.
Uses BSP to communicate LS and build tools.
“Our goal in Metals is to support code navigation with as low
CPU and memory overhead as possible without sacrificing
rich functionality.”
Slide 15
Slide 15 text
No content
Slide 16
Slide 16 text
No content
Slide 17
Slide 17 text
Metals v0.7.6 - Thorium
● Automatic import build for Gradle, Maven and Mill
● Auto-fill option to case classes and functions
● Code completions on keywords
● Deduce values for named parameters completion
● Compilation explorer
● Add support for Scala 2.13 and JDK 11
● Coming soon: rename symbols, find definition, DAP,
worksheets and much more!
Slide 18
Slide 18 text
SemanticDB
● Portable semantic APIs
● Data schema for semantic information about code.
● Relevant for developer tools.
● Protobuf, JSON, SQL.
● Do not require a running compiler.
Slide 19
Slide 19 text
BSP: Build Server Protocol
● Extends LSP
● Formalizes interaction between editors, LS, editors, build
tools
● Bidirectional notifications,
● Client/server architecture.
● Clients are build tools, LS and editors/IDEs.
● Language agnostic.
● JSON-RPC-protobuf.
Slide 20
Slide 20 text
Bloop
● sbt, Maven, Gradle and Mill.
● IntelliJ and Metals (VS Code, Sublime, vim and Atom)
● Provides fast compile, test and run
● Has a built-in command-line tool
● Integrates with most JVM build tools
● Supports JVM, Scala.js and Scala Native
Slide 21
Slide 21 text
Bloop (v1.3.2)
● Compiling deduplication
● Compiling isolation
● Zipkin tracing support
● Use Ammonite by default in bloop console
● Support for Scala 2.13.x, JDK 9 & 11
● Improvements in build tools support
Mill
● Build tools as Pure functional programs
● Fast and Flexible
● Targets with caching
● Inspectale cache graph
● Commands
● Can act as a build server
● Play framework and Bloop support
● Support for Dotty
Slide 24
Slide 24 text
Seed
● Builds are describe in a TOML file
● Handles dependency resolution via coursier
● Generates configurations for Bloop and Intellij
● BSP server integration using ZIO
● Cross-platform support (JVM, JS, LLVM)
● Cross-compile modular projects made easy
Slide 25
Slide 25 text
Pants
● Source based dependency tool
● Aims to large code bases
● Monorepo environments
● Fast
● Scalable
● dependency inference from source-code imports
Slide 26
Slide 26 text
Bazel (v1.0)
● Reproducible builds
● Fast and correct builds
● Heavy caching
● Enforces build correctness
● Large codebases
● Multi-language, multi-platform
● Allow builds to scale
Slide 27
Slide 27 text
TL;DR
Tools that work with my editor => LSP
Build integrations => BSP
Navigation => SemanticDB, TASTy
Refactoring => scalafix
Diagnostics => BSP + LSP