Skip to main content

Metals v1.3.1 - Thallium

· 7 min read

We're happy to announce the release of Metals v1.3.1, which brings in a couple of useful improvements.

Commits since last release74
Merged PRs64
Contributors9
Closed issues27
New features3

For full details: https://github.com/scalameta/metals/milestone/67?closed=1

Metals is a language server for Scala that works with VS Code, Vim, Emacs, Zed, Helix and Sublime Text. Metals is developed at the Scala Center and VirtusLab with the help from contributors from the community.

TL;DR

Check out https://scalameta.org/metals/, and give Metals a try!

Resolve classpath lazily in Bazel

Metals uses Bazel BSP to interact with Bazel itself via the Build Server Protocol. Up until this release, we would eagerly resolve the classpath that is needed for some of the Metals features. However, this caused indexing times to be huge in large Bazel projects as it is expensive to calculate it. To avoid that we now only resolve classpath for targets users are currently working on.

Let us know if you notice any more bottlenecks we can fix!

Replace slowTask with LSP progress

There are several Language Server Protocol extensions that are used in Metals to provide features that go outside the LSP standard. This also included Slow task extension, but since a couple of LSP releases there has been a proper progress endpoint available. This is now used in Metals.

This means that editors that did not implement the slow task extension will now properly show the progress of tasks running within Metals. For anything that did implement it, there might be some visual changes. In Visual Studio Code the progress will be contained at the bottom in the status bar, which can be clicked on to see all current progress messages. Since, it will also contain all the current compilation, we removed Ongoing compilations section from the Metals view. This is possible thanks to the great work done by kasiaMarek.

No workspace support

Thanks to kasiaMarek it's now possible to start Metals for a single file without a workspace. Metals will automatically use Scala CLI for such single files to provide as much support as possible including standard LSP features, such as completions, hover and more.

Miscellaneous

  • bugfix: remove stale config files before bloopInstall for gradle kasiaMarek
  • improvement: do not throw on failed java indexing kasiaMarek
  • bugfix: handle type T = Object.type in type hierarchy indexing kasiaMarek
  • fix: retry calculating build tool digest kasiaMarek
  • improvement: don't override bloop java home if version greater or equal kasiaMarek
  • bugfix: obey hover markup kind capability kasiaMarek
  • improvement: add worksheet timeout setting kasiaMarek
  • bugfix: don't show private apply as a completion kasiaMarek
  • fix: try pc symbol before symbol alternatives in go to definition kasiaMarek
  • fix: include inline when printing param names kasiaMarek
  • bugfix: Set Path instead of PATH on windows tgodzik
  • improvement: remove unused imports on Scala 3.4+ bjaglin
  • fix: show implicit param when it is an apply kasiaMarek
  • fix: dealias type members in hover kasiaMarek
  • improvement: don't start new metals service for project ref kasiaMarek
  • fix: import from build tools, that aren't build server providers when using automatic bsp setting kasiaMarek
  • fix: send end progress if future finished with an exception kasiaMarek

Contributors

Big thanks to everybody who contributed to this release or reported an issue!

$ git shortlog -sn --no-merges v1.3.0..v1.3.1
25 Scalameta Bot
22 Tomasz Godzik
21 Katarzyna Marek
1 Brice Jaglin
1 Martin Mauch
1 Vadim Chelyshov
1 dependabot[bot]
1 scalameta-bot
1 tgodzik

Merged PRs

v1.3.1 (2024-05-14)

Full Changelog

Merged pull requests: