Skip to main content

Metals v0.11.12 - Aluminium

· 10 min read

We're happy to announce the release of Metals v0.11.12. This release brings mostly stability fixes, some various improvements, and a start towards better issue identification and reporting when users experience issues.

Commits since last release105
Merged PRs85
Contributors20
Closed issues38
New features5

For full details: [https://github.com/scalameta/metals/milestone/56?closed=1] (https://github.com/scalameta/metals/milestone/56?closed=1)

Metals is a language server for Scala that works with VS Code, Vim, Emacs and Sublime Text. 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!

Introducing Error Reports

Starting with this release, upon chosen errors or incorrect states in metals error reports will be automatically generated and saved in the .metals/.reports directory within the workspace. Such an error report can later be used by users to attach to a github issue with additional information. All the reports have their paths anonymised.

Currently, we create two types of reports:

  • incognito under .metals/.reports/metals: these error reports contain only metals related stacktraces and should not contain any sensitive/private information
  • unsanitized under .metals/.reports/metals-full: these error reports may contain come sensitive/private information (e.g. code snippets)

To make it easier to attach reports to github issues the zip-reports command will zip all the incognito reports into .metals/.reports/report.zip, while unsanitized reports will have to be browsed and attached by hand. In order not to clutter the workspace too much, only up to 30 last reports of each kind are kept at a time.

When running into a problem in VSCode (or any editor that implements this command) users can use the Metals: Open new github issue command. This will create a template for an issue with all basic info such as Metals version, used build server etc.. Next, you can browse through reports and drag and drop chosen ones to your GitHub issue. Invoking the Metals: Zip reports command will create a zip of all the incognito that reports can also be included in the issue.

Reports Zip reports

New code action for converting dependencies from sbt to scala-cli compliant ones

New code action for scala-cli using (dep | lib | plugin) directives, which allows to convert dependencies from sbt style to scala-cli compliant ones.

Convert dependency

A great contribution by majk-p.

Improvements to semantic highlighting

This release brings a lot of improvements for semantic highlighting thanks to jkciesluk and tgodzik. This includes:

  • Added declaration and definition tokens.
  • Parameters are now read only.
  • Added semantic highlighting for using directives.
  • Fixed semantic highlighting for Scala 3 worksheets.
  • Changed token type for predef aliases to "class".
  • Fixed sematic highlighting in sbt files.

Miscellaneous

  • bugfix: Ignored tests now show up in the test explorer. kpodsiad
  • improvement: Reworked package rename upon file move.
  • bugfix: Fixed go to and hover for TypeTest. tgodzik
  • feature: Auto connect to bazel-bsp if it's installed. tanishiking
  • docs: Updated emacs support table. kurnevsky
  • bugfix: Placing cursor on primary contructor type parameter no longer incorrectly highlights type parameter with the same name used in a member definiton. tgodzik
  • bugfix: Added Reload sbt after changes in the metals.sbt plugin file. adpi2
  • bugfix: Added handling fixing wildcard imports upon file rename.
  • bugfix: Added refresh test case code lenses after test discovery. LaurenceWarne
  • bugfix: Fixed lacking newline for new imports added upon file move. susliko
  • bugfix: Add showing lenses when BSP server is plain Scala.
  • bugfix: A workaround for running BSP sbt when it's installed in a directory with a space on Widows. tgodzik
  • improvement: If an aliased inferred type is not in scope dealias it.
  • feature: Add hover information for structural types. jkciesluk
  • feature: Inline code action will be no longer executed if any of the references used on the right-hand side of the value to be inlined are shadowed by local definitions. In this case a warning will be shown to the user instead.
  • bugfix: Fixed test suite discovery in presence of a companion object. xydrolase
  • bugfix: Fixed shown return type of completions, that are no argument members, which return type depends on the ower type parameter.
  • bugfix: Strip ANSI colors before printing worksheet results.
  • improvement: Force close thread when file watching cancel hangs. tgodzik
  • bugfix: Add end condition for tokenizing partially written code, so tokenizing doesn't hang. tgodzik
  • bugfix: Correctly adjust span for extension methods for correctly displayed highligh. jkciesluk
  • bugfix: Correctly show Expression type (dealiased type) for parametrized types.
  • bugfix: Filter out -Ycheck-reentrant option for worksheets, so worksheets correctly show results. tgodzik
  • bugfix: Show correct defaults when named parameters order is mixed in Scala 2. tgodzik
  • bugfix: Print better constructors in synthetic decorator.
  • bugfix: Show synthetic objects as options for case classes and AnyVal implicit classes in Metals Analayze Source. kpodsiad
  • bugfix: Corrrectly handle testfiles renames in test explorer. kpodsiad

Contributors

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

$ git shortlog -sn --no-merges v0.11.11..v0.11.12
23 scalameta-bot
21 Tomasz Godzik
11 Katarzyna Marek
10 Jakub Ciesluk
7 Michal Pawlik
6 Kamil Podsiadlo
5 Rikito Taniguchi
3 adpi2
3 Kamil Podsiadło
3 Michał Pawlik
3 dependabot[bot]
2 tgodzik
1 Chris Kipp
1 Vadim Chelyshov
1 Vasiliy Morkovkin
1 Xin Yin
1 Laurence Warne
1 Jędrzej Rochala
1 Evgeny Kurnevsky
1 Scalameta Bot

Merged PRs

v0.11.12 (2023-04-21)

Full Changelog

Merged pull requests: