Metals v1.1.0 - Silver
We're happy to announce the release of Metals v1.1.0, which brings stability fixes and takes another step towards bettering error detection and error reporting.
Commits since last release | 114 |
Merged PRs | 104 |
Contributors | 13 |
Closed issues | 32 |
New features | 2 |
For full details: https://github.com/scalameta/metals/milestone/60?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 contributors from the community.
TL;DR
Check out https://scalameta.org/metals/, and give Metals a try!
- New Scala versions support
- Build server status
- Enable run code lens for Mill build server
- Convert single line comments to multiline
- Detect project root
- Error reports in metals doctor
- Show bloop errors
- Changes for plugin authors
New Scala versions support
Support for Scala 3.3.1
Scala 3.3.1 is a new version of the Scala 3 LTS and it adds support for JDK 16 records in Java sources.
For more information about the release take a look at https://github.com/lampepfl/dotty/releases/tag/3.3.1
Support for Scala 2.13.12
The main improvement of Scala 2.13.12 are actionable diagnostics. They are compiler suggested fixes for some errors and warnings. Actionable diagnostics are available in metals as code actions coming directly from the compiler.
For more information about the release take a look at https://github.com/scala/scala/releases/tag/v2.13.12
Build server connection status
Since the previous release metals detects and reports when the build server stops responding. Over the last months this feature was stabilized and the information about the build server connection is now visible in the status bar. For clients that don't support this status bar yet, the error message will be displayed as before.
Build server connection status in VSCode, when metals is successfully connected to sbt
build server.
If you are a maintainer of a metals' client and want to know how to add support for build server status see Changes for clients.
Enable run code lens for Mill build server
Thanks to Tomasz Godzik now we have run code lens when using Mill build server. As a reminder, it's possible to start using it by running Metals: Switch build server
command for a Mill project.
Convert single line comments to multiline
Thanks to Kasper Kondzielski we have a new code action that converts a block of single line comments into a multiline comment.
Detect project root
Sometimes your Scala project root is not in the same folder that you open your editor in. Now metals will also detect the Scala project root when it is a child of the workspace/workspace folder root.
. *workspace root*
├── scalaProject *detected project root*
│ ├── .sbt
│ ├── src/main/scala
│ │ ├── Main.scala
│ │ └── ...
│ └── ...
├── someOtherProject
│ └── ...
├── .gitignore
└── ...
Error reports in metals doctor
Error reports are now visible in the metals doctor to help users diagnose the cause of any potential issue. Previously, they would only exist in the .metals/.reports
folder.
Show bloop errors
Before this release Bloop build server errors would only be logged silently into metals.log
and the Metals output. Now for the sake of visibility Bloop errors are also shown to the users in form of error messages. The message can be dismissed for the current session of Metals or you can turn off all messages in a workspace.
Changes for plugin authors
Build server status
We added bspStatusBarProvider
field to initialization parameters. Similarly to statusBarProvider
it can have one of the following values: "on"
, "off"
, "log-message"
, "show-message"
(default).
When bspStatusBarProvider
is set to "on"
, the build server status is send via metals/status
with new field "statusType"
set to "bsp"
.
New fields in MetalsStatusParams
:
statusType
"bsp"
for build server status"metals"
for metals status (default)
level
- severity level of the message, possible values:"info"
,"warn"
,"error"
commandTooltip
- command tooltip, which can be appended to the status tooltip if the status bar supports commands
For more details refer to the PR.
Doctor results v5
New errorReports
field in DoctorFolderResults
containing an array of ErrorReportInfo
, which has the following fields:
name
string - display name of the error,timestamp
long - timestamp of the report creation date,uri
string - error report file uri,buildTarget
nullable string - optional build target that the error is associated with,shortSummary
string - short error summary,errorReportType
string - one of "metals", "metals-full", "bloop". For more details refer to the PR.
Miscellaneous
- bugfix: incorrect docstring completions when not directly over definition (jkciesluk)
- bugfix: don't use cache directory when incorrectly resolved path (tgodzik)
- bugfix: skip empty lines when calculating indentation for auto import (kasiaMarek)
- improvement: update ranges on Scala CLI actionable diagnostics for files with non-saved changes (LaurenceWarne)
- bugfix: correctly choose the folder to use for a command (tgodzik)
- bugfix: extract member with associated comments (kasiaMarek)
- bugfix: handle EOF in java completions (kasiaMarek)
- bugfix: workaround for missing span in reference to an extension method defined in the companion object (kasiaMarek)
- improvement: automatically calculate last supported versions for semanticdb (tgodzik)
- bugfix: escape special chars in test names (kasiaMarek)
- bugfix: add
moduleClass
imported symbols inIndexedContext
(fix for insert type annotation) (kasiaMarek) - bugfix: fix resolving main class/ test suite for multi-root projects (kasiaMarek)
- bugfix: wait longer to connect to build tools other than Bloop (tgodzik)
- improvement: don't create service for folders with non-Scala projects (kasiaMarek)
- bugfix: semantic tokens for multiline strings in Scala3 worksheets (jkciesluk)
- bugfix: incorrect docstring on parameters (jkciesluk)
- improvement: trim hover body (kasiaMarek)
- feature: user configuration per workspace folder (kasiaMarek)
- bugfix: named args completions with default values (jkciesluk)
- bugfix: exhaustive match on stale symbols (jkciesluk)
- bugfix: fix docstring regex in semantic highlighting (jkciesluk)
- improvement: add timeout to fix java version for sbt request (kasiaMarek)
- bugfix: fix reporting "no response error" after laptop in sleep mode (kasiaMarek)
- bugfix: match completions for type aliases in Scala 3 (kasiaMarek)
- bugfix: handle created build server config before all content written (kasiaMarek)
- improvement: only log mtgas resolve messages on resolution (tgodzik)
- bugfix: dependency completions with double colon before version (using directives) (jkciesluk)
- bugfix: semantic highlighting in worksheets starting with an empty line (jkciesluk)
- bugfix: don't read file for InteractiveSemanticdbdb if it doesn't exist (tgodzik)
Contributors
Big thanks to everybody who contributed to this release or reported an issue!
$ git shortlog -sn --no-merges v1.0.1..v1.1.0
34 Katarzyna Marek
24 Scalameta Bot
22 Tomasz Godzik
10 Jakub Ciesluk
6 dependabot[bot]
4 rochala
4 scalameta-bot
4 tgodzik
2 Laurence Warne
1 Chris Kipp
1 Ethan Atkins
1 Jack Koenig
1 Kasper Kondzielski
Merged PRs
v1.1.0 (2023-10-17)
Merged pull requests:
- bugfix: add user config promise #5751 (kasiaMarek)
- chore: Bump Scalameta to 4.8.12 #5753 (tgodzik)
- bugfix: Don't read file for InteractiveSemanticdbdb if it doesn't exist #5749 (tgodzik)
- bugfix: Semantic highlighting in worksheets starting with empty line #5746 (jkciesluk)
- bugfix: Dependency completions with double colon before version #5724 (jkciesluk)
- docs: Move acknowledgements/team to the website #5747 (ckipp01)
- build(deps): Update guava from 32.1.2-jre to 32.1.3-jre #5741 (scalameta-bot)
- build(deps): Update xnio-nio from 3.8.10.Final to 3.8.11.Final #5743 (scalameta-bot)
- build(deps): Update flyway-core from 9.22.2 to 9.22.3 #5742 (scalameta-bot)
- improvement: Only log messages on resolution #5740 (tgodzik)
- Add error reports info to metals doctor #5683 (kasiaMarek)
- bugfix: handle created build server config before all content written #5734 (kasiaMarek)
- bugfix: match completions for type aliases scala 3 #5714 (kasiaMarek)
- bugfix: hang on
initialize
#5735 (kasiaMarek) - bugfix: fix reporting "no response error" after laptop in sleep mode #5716 (kasiaMarek)
- improvement: add timeout to fix java version for sbt request #5715 (kasiaMarek)
- bugfix: Fix docstring regex in semantic highlighting #5729 (jkciesluk)
- bugfix: exhaustive match on stale symbols #5733 (jkciesluk)
- build(deps): Update metaconfig-core from 0.11.1 to 0.12.0 #5719 (scalameta-bot)
- chore: Update Scalameta to 4.8.11 #5681 (tgodzik)
- bugfix: Named args completions with default values #5657 (jkciesluk)
- build(deps): Update bsp4j from 2.1.0-M5 to 2.1.0-M7 #5718 (scalameta-bot)
- User configuration per workspace folder #5709 (kasiaMarek)
- bugfix: Try to fix Mill flaky test #5661 (tgodzik)
- bugfix: Fix completions tests after a new artifact starting with io.circ showed up #5723 (tgodzik)
- build(deps): Update ammonite-util from 3.0.0-M0-55-8ef21714 to 3.0.0-M0-56-1bcbe7f6 #5721 (scalameta-bot)
- build(deps): Update protobuf-java from 3.24.3 to 3.24.4 #5720 (scalameta-bot)
- build(deps): Update mill-contrib-testng from 0.11.4 to 0.11.5 #5722 (scalameta-bot)
- improvement: show bsp as connected after the first message from build server #5707 (kasiaMarek)
- test: try to fix
cancel-compile
inBillLspSuite
#5713 (kasiaMarek) - improvement: add do not show bsp errors option #5678 (kasiaMarek)
- test: move cancel compile test to sbt #5711 (kasiaMarek)
- Add and adjust test according to changes in dotty #5710 (rochala)
- improvement: trim hover body #5694 (kasiaMarek)
- bugfix: Incorrect docstring on parameters #5656 (jkciesluk)
- chore: Update ammonite to the newest snaphot #5697 (tgodzik)
- bugfix: Semantic tokens for multiline strings in Scala3 worksheets #5691 (jkciesluk)
- improvement: don't create service for folders w/ non-Scala projects #5562 (kasiaMarek)
- improvement: cancel current request in batched functions #5432 (kasiaMarek)
- test: fix
ScalaCliSuite.connecting-scalacli
#5698 (kasiaMarek) - chore: add debug logs to server liveness monitor #5693 (kasiaMarek)
- build(deps): bump @docusaurus/plugin-client-redirects from 2.4.1 to 2.4.3 in /website #5703 (dependabot[bot])
- build(deps): bump coursier/setup-action from 1.3.3 to 1.3.4 #5701 (dependabot[bot])
- build(deps): bump @easyops-cn/docusaurus-search-local from 0.35.0 to 0.36.0 in /website #5704 (dependabot[bot])
- build(deps): bump actions/checkout from 3 to 4 #5702 (dependabot[bot])
- build(deps): bump @docusaurus/preset-classic from 2.4.1 to 2.4.3 in /website #5705 (dependabot[bot])
- build(deps): bump @docusaurus/core from 2.4.1 to 2.4.3 in /website #5706 (dependabot[bot])
- bugfix: Wait longer to connect to build tools other than Bloop #5696 (tgodzik)
- bugfix: fix resolving main class/ test suite for multi-root projects #5596 (kasiaMarek)
- docs: Document AnyVal as not supported in worksheets #5695 (tgodzik)
- bugfix: add
moduleClass
imported symbols inIndexedContext
#5690 (kasiaMarek) - improvement: move bsp responsiveness into status #5660 (kasiaMarek)
- build(deps): Update interface from 1.0.18 to 1.0.19 #5688 (scalameta-bot)
- bugfix: escape special chars in test names #5676 (kasiaMarek)
- Add code action to convert single line comment into multiline comment #5633 (ghostbuster91)
- bugfix: Make sure we are using latest known scalameta version #5675 (tgodzik)
- improvement: Automatically calculate last supported versions for semanticdb #5671 (tgodzik)
- chore: Fix nightly CI #5673 (tgodzik)
- build(deps): Update coursier from 2.1.6 to 2.1.7 #5635 (scalameta-bot)
- build(deps): Update mill-contrib-testng from 0.11.3 to 0.11.4 #5666 (scalameta-bot)
- improvement: auto detect project root #5576 (kasiaMarek)
- bugfix: workaround for missing span in reference to an extension method defined in the companion object #5640 (kasiaMarek)
- build(deps): Update flyway-core from 9.22.1 to 9.22.2 #5668 (scalameta-bot)
- build(deps): Update file-tree-views from 2.1.11 to 2.1.12 #5667 (scalameta-bot)
- bugfix: deduplicate auto connect requests for scala-cli #5645 (kasiaMarek)
- Bump swoval to v2.1.11 #5659 (eatkins)
- bugfix: handle EOF in java completions #5644 (kasiaMarek)
- build(deps): Update mill-contrib-testng from 0.11.2 to 0.11.3 #5652 (scalameta-bot)
- build(deps): Update munit from 1.0.0-M9 to 1.0.0-M10 #5655 (scalameta-bot)
- build(deps): Update ujson from 3.1.2 to 3.1.3 #5653 (scalameta-bot)
- build(deps): Update sbt, scripted-plugin from 1.9.4 to 1.9.6 #5654 (scalameta-bot)
- build(deps): Update munit from 1.0.0-M8 to 1.0.0-M9 #5648 (scalameta-bot)
- build(deps): Update flyway-core from 9.22.0 to 9.22.1 #5647 (scalameta-bot)
- build(deps): Update sbt-scalafix, scalafix-interfaces from 0.11.0 to 0.11.1 #5646 (scalameta-bot)
- bugfix: extract member with associated comments #5639 (kasiaMarek)
- test:
single-file-config
#5641 (kasiaMarek) - improvement: have
Dismiss.
remember the bsp error and don't show it again #5631 (kasiaMarek) - chore: adjust tests for 2.13.13 #5638 (kasiaMarek)
- build(deps): Update semanticdb-java from 0.9.5 to 0.9.6 #5634 (scalameta-bot)
- improvement: start liveness monitor only for main bsp connection #5608 (kasiaMarek)
- chore: Unignore suites related to coursier shadowing #5626 (tgodzik)
- chore: Add support for Scala 2.13.12 #5624 (tgodzik)
- build(deps): Update protobuf-java from 3.24.2 to 3.24.3 #5627 (scalameta-bot)
- build(deps): Update sbt-jmh from 0.4.5 to 0.4.6 #5628 (scalameta-bot)
- chore: Add support for Scala 3.3.1 #5620 (tgodzik)
- build(deps): Update scribe, scribe-file, scribe-slf4j from 3.11.9 to 3.12.2 #5615 (scalameta-bot)
- bugfix: Correctly choose the folder to use for a command #5612 (tgodzik)
- build(deps): Update scalafmt-core, scalafmt-dynamic from 3.7.13 to 3.7.14 #5616 (scalameta-bot)
- build(deps): Update bloop-launcher-core from 1.5.8 to 1.5.11 #5613 (scalameta-bot)
- improvement: log awaiting user response in BloopInstall #5597 (jackkoenig)
- chore: update minimum supported gradle version #5609 (kasiaMarek)
- build(deps): Update flyway-core from 9.21.2 to 9.22.0 #5605 (scalameta-bot)
- build(deps): Update scalafmt-core, scalafmt-dynamic from 3.7.12 to 3.7.13 #5606 (scalameta-bot)
- Update ranges on Scala CLI actionable diagnostics for
didChange
#5487 (LaurenceWarne) - chore: Add support for Scala 3.3.1-RC7 #5601 (tgodzik)
- Fix wrapper constructor, add missing constructor #5600 (rochala)
- bugfix: Allow run in Mill BSP and remove non working test lenses #5566 (tgodzik)
- bugfix: Release mtagsShared together with mtags when running single version release #5598 (tgodzik)
- improvement: show bsp errors to the user #5267 (kasiaMarek)
- bugfix: skip empty lines when calculating indent for auto import #5570 (kasiaMarek)
- bugfix: Don't use cache directory with
null
in it's path #5595 (tgodzik) - bugfix: Incorrect docstring completions #5593 (jkciesluk)
- chore: Add support for Scala 3.3.1-RC6 #5587 (tgodzik)
- Add release notes 1.0.1 #5575 (jkciesluk)