Skip to main content

Metals v0.9.0 - Lithium

We are happy to announce the release of Metals v0.9.0, codename "Lithium", which main focus is introducing support for Scala 3 starting with versions 0.23.0 and 0.24.0-RC1. We also added support for Scala 2.13.2 and a number of other useful improvements.

Commits since last release140
Merged PRs45
Contributors14
Closed issues9
New features3

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

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

TL;DR#

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

  • Scala 2.13.2 and basic Scala 3 support
  • Improvements to the Bloop integration
  • Automatically add '+' on newline when inside a string
  • New Code action: "Import all missing symbols"

Basic Scala 3 support#

For a couple of the last months we have been working on making Metals work with the Dotty compiler, which will become the new Scala 3. This effort included contributions to Metals, Bloop as well as to Dotty. Thanks to the great help from the Dotty compiler team, we now have an option to generate semanticDB files used for our internal indexes, which allowed some features to work without any changes to the core code. It is also important to mention that without jvican and his Bloop project, which already supports Scala 3, all this would have taken a much longer time.

That said, there are some issues that are lacking in the Scala 3 support that are available for 2.x versions. Most notably, we are still missing all of the more advanced completions, filtering and sorting of completion items or auto imports. There are also some possible issues connected to optional braces and top level methods features. In the upcoming months we are planning to address most of these issues and implement the lacking features.

You can find missing features in the feature requests repository and currently known bugs in the main Metals repo.

The first supported versions will be 0.23.0 and 0.24.0-RC1, which are the latest stable and the latest release candidate respectably. We plan to always support the latest stable and release candidate until there is a more stable release cycle for Scala 3.

Please do report any issues you encounter, especially connected to some new Scala 3 features, which will be an immense help to the team.

Improvements related to Bloop/Metals integration#

There have been multiple reported issues in the last weeks about hanging compilation, which can make the Metals workspace hard to use. Our top priority has been figuring out all the possible issues both in Metals as well as in Bloop. Thanks to some fixes done by jvican, and some work on the Metals side on the Bloop integration we're hopeful that some of the issues are becoming less frequent. These fixes are included in this release.

We also reworked the Metals tree view to highlight some commands that a user can use to fix their workspace as well as added two new commands:

  • Clean compile workspace - clean compile the whole workspace - might be needed in case of broken compiler caches.

  • Restart Bloop server - restart the Bloop build server, which should help with the cases where compilation would hang.

    reworked-tree-view

Even if those commands help, do not hesitate to report any issues. We are also monitoring the situation ourselves and investigating all problems encountered.

Automatically add '+' on newline inside a string#

The Metals team was recently joined by mlachkar, an engineer from the Scala Center, who already contributed a number of features and bug fixes to the project. Thanks to her, we can now easily enter a newline inside a single line string and that string will be correctly split with an additional +.

split-line

Code action to import all missing symbols#

Previously, it was only available to import one symbol at a time in case of missing imports. Thanks to colineto we now have the ability to import everything in bulk for every unambiguous import available. Unambiguous in this case meaning that there is only one possible import to choose from.

import-all

Miscellaneous improvements#

  • Added an option to ignore .scalafmt.conf creation message.
  • Fixed hanging while debugging if workspace had errors.
  • Fixed issue with folding in non 2.12.11 workspaces.
  • Turn off "Go to parent" code lenses by default due to performance problems in large workspaces.
  • Fixed false parsing errors in 2.13.x workspaces.
  • Added date string to metals logs.
  • Fixed issue with additional src directories being created automatically.
  • Fixed "Go to implementation" to work with local aliases.
  • Fixed auto-import issue in package objects.

Contributors#

Big thanks to everybody who contributed to this release! We had a lot of new contributors doing some really exemplary work.

$ git shortlog -sn --no-merges v0.8.4..v0.9.0
Ayoub Benali
Tomasz Godzik
Scala Steward
Chris Kipp
Coline Thomas
Meriam Lachkar
Win Wang
Elie Poussou
Krzysztof Bochenek
Olafur Pall Geirsson
Aleksei Alefirov
Naoki Takezoe
Nathaniel Fischer
Tomasz Pasternak

Merged PRs#

v0.9.0 (2020-05-04)#

Full Changelog

Merged pull requests: