Skip to main content

Metals v1.3.2 - Thallium

· 9 min read
Katarzyna Marek
Katarzyna Marek

We're excited to announce the release of Metals v1.3.2. This new version not only addresses numerous bugs but also enhances the experience of working with code that does not compile.

Commits since last release87
Merged PRs82
Contributors13
Closed issues26
New features1

For full details: https://github.com/scalameta/metals/milestone/68?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!

Outline compilation

Metals relies on information produced during compilation for much of its functionality. This limits the usefulness of many Metals features when the code is broken either by providing outdated information or no information if the project was never successfully compiled.

Starting with this release Metals will utilize outline compilation to get current information about not compiling files for Scala 2.12.x and 2.13.x. This should improve the experience of working with not compiling code.

There are a few limitations to this improvement, the biggest being that the information from outline compilation will be only available within the same build target (module).

Further work is being done on a similar approach for Scala 3, which should be available in one of the upcoming releases.

broken-code Completions on not compiling code

Before this release Metals would always use information from SemanticDB to search for references. Since SemanticDB is produced during compilation it would fail to find references for code that didn't compile. Now if SemanticDB information is missing or outdated Metals will fallback to using presentation compiler for reference search for all the files this concerns.

uncompiled-go-to-ref Find references on non-compiling code

Allow to override debug server startup timeout

Until this release there was a fixed timeout for debug server startup time set to one minute. This proved to be insufficient for some larger projects and can now be overridden using a server property, e.g. -Dmetals.debug-server-start-timeout=90 increases the timeout to 90 seconds.

This is meant more as a temporary workaround, we also plan to work on decreasing the startup times, as this heavily impacts the user experience.

Miscellaneous

  • improvement: suggest scalafix config amend if OrganizeImports.targetDialect = Scala3 missing for Scala 3 kasiaMarek
  • improvement: Show actual Scala versions supported by Metals in docs and when running metals --versions tgodzik
  • fix: Fix infinite indexing for broken sources tgodzik
  • fix: target jar classpath resolution for mill-bsp kasiaMarek
  • fix: use OS specific spelling for Path/PATH mdelomba
  • fix: search for gradle wrapper at project root kasiaMarek
  • fix: don't start mtags with full classpath tgodzik
  • fix: indexing for filenames with ``` kasiaMarek
  • fix: infer correct build target for jars tgodzik
  • fix: fix millw script tgodzik
  • fix: insert missing members in correct place for case classes kasiaMarek
  • fix: highlighting and completions for multiline strings in worksheets in Scala 3 kasiaMarek
  • feat: set unused tag for unused diagnostics ghostbuster91
  • fix: account for additional parenthesis around args in convert to named args kasiaMarek
  • improvement: don't run additional compilation on find references kasiaMarek
  • fix: indexing when java files contain #include header kasiaMarek
  • fix: correctly auto import when there is a renamed symbol with the same name in scope kasiaMarek
  • fix: handle implicit params in extract method kasiaMarek
  • fix: don't show implicit conversion for implicit params kasiaMarek
  • fix: resolve correctly project refs for sbt kasiaMarek
  • improvement: make sure we always have correct projectview file for Bazel tgodzik
  • fix: convert block args to named args when in parenthesis kasiaMarek
  • fix: auto import for class names with long packages kasiaMarek
  • fix: don't create semanticdb next to user sources for single files kasiaMarek
  • fix: don't override JAVA_HOME if it already exists for Bazel to avoid unnecessary restarts
  • improvement: recreate classloader if scalafix classloading fails. tgodzik

Contributors

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

$ git shortlog -sn --no-merges v1.3.1..v1.3.2
26 Katarzyna Marek
24 Scalameta Bot
18 Tomasz Godzik
7 tgodzik
4 dependabot[bot]
1 Bohdan Buz
1 Brian Wignall
1 Grigorii Chudnov
1 Kasper Kondzielski
1 Michael DeLomba
1 scalameta-bot
1 spamegg
1 temurlock

Merged PRs

v1.3.2 (2024-06-19)

Full Changelog

Merged pull requests:

  • improvement: Recreate classloader if scalafix classloading fails #6516 (tgodzik)
  • bugfix: Don't override JAVA_HOME if it already exists #6504 (tgodzik)
  • fix: don't create semanticdb next to user sources for single files #6509 (kasiaMarek)
  • refactor: code duplication in SupportedScalaVersions #6511 (buzbohdan)
  • build(deps): Update scalafmt-core from 3.8.1 to 3.8.2 #6514 (scalameta-bot)
  • build(deps): Update scalameta, semanticdb-scalac, ... from 4.9.5 to 4.9.6 #6515 (scalameta-bot)
  • build(deps): Update xnio-nio from 3.8.15.Final to 3.8.16.Final #6513 (scalameta-bot)
  • build(deps): Update ammonite-util from 3.0.0-M2-8-ba4429a2 to 3.0.0-M2-11-713b6963 #6512 (scalameta-bot)
  • improvement: Don't show bazel navigation issue always #6510 (tgodzik)
  • fix: propagate jvmopts to tests #6505 (gchudnov)
  • fix: prefer latter fully qualified name parts when building trigrams for fuzzy search #6482 (kasiaMarek)
  • fix: convert block args to named args when in parenthesis #6487 (kasiaMarek)
  • Add missing word #6502 (bwignall)
  • chore: Don't recalculate build tools every time #6462 (tgodzik)
  • improvement: Make sure we always have correct projectview file #6457 (tgodzik)
  • improvement: sort abstract members for auto implement #6496 (kasiaMarek)
  • fix: resolve correctly project refs for sbt #6486 (kasiaMarek)
  • improvement: don't delete classpath jars for running main from .metals/.tmp before server shutdown #6495 (kasiaMarek)
  • improvement: allow to override debug server startup timeout #6492 (kasiaMarek)
  • fix: don't show implicit conversion for implicit params #6493 (kasiaMarek)
  • improvement: Run mtags check parallel and set maximum timeout #6451 (tgodzik)
  • build(deps): Update protobuf-java from 4.27.0 to 4.27.1 #6489 (scalameta-bot)
  • build(deps): Update scribe, scribe-file, scribe-slf4j2 from 3.14.0 to 3.15.0 #6490 (scalameta-bot)
  • fix: use server command for doctor run in status bar #6474 (kasiaMarek)
  • fix: handle implicit params in extract method #6479 (kasiaMarek)
  • fix: correctly auto import when there is a renamed symbol with the same name in scope #6480 (kasiaMarek)
  • fix: allow for #include header #6473 (kasiaMarek)
  • improvement: don't run compileAndLookForNewReferences #6429 (kasiaMarek)
  • chore: Unignore and fix references Bazel test #6458 (tgodzik)
  • feat: Set unused tag for unused diagnostics #6378 (ghostbuster91)
  • fix: Account for additional parenthesis around args in convert to named args #6455 (kasiaMarek)
  • improvement: batch pc references calls #6453 (kasiaMarek)
  • build(deps): Update scribe, scribe-file, scribe-slf4j2 from 3.13.5 to 3.14.0 #6471 (scalameta-bot)
  • build(deps): Update guava from 33.2.0-jre to 33.2.1-jre #6469 (scalameta-bot)
  • build(deps): Update ammonite-util from 3.0.0-M2-6-38698450 to 3.0.0-M2-8-ba4429a2 #6470 (scalameta-bot)
  • build(deps): bump @easyops-cn/docusaurus-search-local from 0.40.1 to 0.41.0 in /website #6467 (dependabot[bot])
  • build(deps): bump @docusaurus/plugin-client-redirects from 3.2.1 to 3.4.0 in /website #6466 (dependabot[bot])
  • build(deps): bump @docusaurus/core from 3.2.1 to 3.4.0 in /website #6465 (dependabot[bot])
  • build(deps): bump scalacenter/sbt-dependency-submission from 2 to 3 #6464 (dependabot[bot])
  • build(deps): Update requests from 0.8.2 to 0.8.3 #6463 (scalameta-bot)
  • Update faq.md #6461 (spamegg1)
  • bugfix: Filter out target #6460 (tgodzik)
  • fix: pc functions for multiline strings in worksheets in scala 3 #6456 (kasiaMarek)
  • fix: insert missing members in correct place for case classes #6454 (kasiaMarek)
  • refactor: Don't try to download artifacts in ProblemResolverSuite #6449 (tgodzik)
  • improvement: do not cache presentation compilers for find references #6448 (kasiaMarek)
  • fix: use pc for references when go to def on definition #6447 (kasiaMarek)
  • improvement: Retry rename tests, since they seem most flaky #6450 (tgodzik)
  • bugfix: Use actual method arguments from DAP server interface #6444 (tgodzik)
  • bugfix: Fix millw script #6446 (tgodzik)
  • build(deps): Update cli_3, scala-cli-bsp from 1.3.1 to 1.3.2 #6443 (scalameta-bot)
  • bugfix: Infer correct build target for jars #6437 (tgodzik)
  • build(deps): Update xnio-nio from 3.8.14.Final to 3.8.15.Final #6442 (scalameta-bot)
  • build(deps): Update org.eclipse.lsp4j, ... from 0.22.0 to 0.23.1 #6434 (scalameta-bot)
  • fix: getting top levels for filenames with ``` #6430 (kasiaMarek)
  • build(deps): Update ammonite-util from 3.0.0-M2-5-1c823fef to 3.0.0-M2-6-38698450 #6441 (scalameta-bot)
  • bugfix: Don't start mtags with full classpath #6439 (tgodzik)
  • chore: Bump Bazel BSP to a version with newest fixes #6438 (tgodzik)
  • build(deps): Update org.eclipse.lsp4j, ... from 0.20.1 to 0.22.0 #6126 (scalameta-bot)
  • build(deps): Update munit from 1.0.0-RC1 to 1.0.0 #6435 (scalameta-bot)
  • build(deps): Update ammonite-util from 3.0.0-M2-3-b5eb4787 to 3.0.0-M2-5-1c823fef #6433 (scalameta-bot)
  • build(deps): Update bloop-launcher-core from 1.5.17 to 1.5.18 #6431 (scalameta-bot)
  • build(deps): Update protobuf-java from 4.26.1 to 4.27.0 #6432 (scalameta-bot)
  • fix: look for gradle wrapper at project root #6428 (kasiaMarek)
  • improvement: use pc for finding references of local symbols and when semanticdb is missing #5940 (kasiaMarek)
  • Fixed issue where oldPath wasn't using OS specific spelling for Path/PATH #6427 (mdelomba)
  • chore: Bump Scala Debug Adapter to latest #6425 (tgodzik)
  • fix: targetJarClasspath for mill-bsp #6424 (kasiaMarek)
  • improvement: Automatically update bazel bsp #6410 (tgodzik)
  • bugfix: Fix infinite indexing #6420 (tgodzik)
  • build(deps): Update ammonite-util from 3.0.0-M2-2-741e5dbb to 3.0.0-M2-3-b5eb4787 #6421 (scalameta-bot)
  • Outline compiler #6114 (kasiaMarek)
  • refactor: Move parts specific for workspace folder from MetalsLspServer #6347 (kasiaMarek)
  • chore: Bump Bazel BSP and add tests about warnings #6407 (tgodzik)
  • improvement: Show actual Scala versions supported by Metals #6417 (tgodzik)
  • improvement: suggest scalafix config amend if `OrganizeImports.target… #6389 (kasiaMarek)
  • build(deps): Update ujson from 3.3.0 to 3.3.1 #6422 (scalameta-bot)
  • build(deps): Update scalameta from 4.9.3 to 4.9.5 #6423 (scalameta-bot)
  • refactor: Add -Xsource:3 flag to easy migration to Scala 3 #6411 (tgodzik)
  • build(deps): Update ammonite-util from 3.0.0-M1-24-26133e66 to 3.0.0-M2-2-741e5dbb #6413 (scalameta-bot)
  • remove unused bloomfilter #6399 (Temurlock)
  • docs: Add release notes for Metals 1.3.1 #6403 (tgodzik)