Metals v0.11.2 - Aluminium
We're happy to announce the release of Metals v0.11.2, which focuses on improving overall user experience.
Commits since last release | 197 |
Merged PRs | 94 |
Contributors | 11 |
Closed issues | 19 |
New features | 7 |
For full details: https://github.com/scalameta/metals/milestone/?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!
- Reduce indexing time in monorepos on MacOS
- Display build target info
- View source jar files as virtual docs
- Improve completions for Scala 3
- [Test Explorer] Detect and run single tests for JUnit4
Reduce indexing time in monorepos on MacOS
Thanks to changes made by Duhemm, Metals on MacOS can now index monorepo workspaces much faster than before. After changes, we observed at times over 10 times faster indexing times in the workspaces where only a few submodules needed to be imported.
Here are a few examples of indexing improvement. They are not actual benchmarks of any kind, but more of rough estimations of improvements in a couple of example repos.
Before | After |
---|---|
>10minutes | ~30seconds |
~40seconds | ~4s |
However, take into mind that indexing speedup heavily depends on your repository structure. The more imported modules which don't need to be imported, the greater the speed improvement is.
If you are interested in details you can check out the related pull request.
Display build target info
Thanks to the Arthurm1 Metals is now able to display all important information about modules. This brand new feature gathers in one view information such as:
- javac and scalac options
- dependent modules
- projects classpath
- and many more
[vscode] View source jar files as virtual docs
Previously, when the client wanted to browse files in source jars source, these files were extracted and saved in the metals/readonly/dependencies
directory. With the help of virtual documents Metals can show you dependencies in readonly files without unnecessary copying.
Thanks Arthurm1 for this feature!
Together with Metals tab, this feature could be used to browse through your dependencies' sources. Just run the Metals: Reveal Active File in Side Bar
command and browse through both dependencies and source code seamlessly.
Currently, Metals: Reveal Active File in Side Bar
works only for Scala 2.
Improve completions for Scala 3
Completion suggestions for different Scala keywords now work with most of the Scala 3 keywords. This includes for example given
and enum
, it should also work even if defining things in toplevel without a wrapping class or object.
Another improvement for Scala 3 completions is better support for showing scope completions, when writing in an empty line. Previously, we would not show correct completions when no identifier was specified.
object Foo:
def bar: Int = 42
def baz: Int =
val x = 1
val y = 2
@@
In the above situation with cursor position indicated by @@
we will now properly show bar
and baz
completions.
[Test Explorer] Detect and run single tests for JUnit4
We're actively working on improving the Test Explorer and making it better with each release. From this release, Metals is able to run or debug single test in JUnit4.
Currently, this feature only works when using Bloop as your build server, but in a future release there will be support added for sbt as well.
[vscode] Add mirror setting to help coursier set up
In order to bootstrap Metals, vscode's extension uses the coursier script which needs access to repo1.maven.org
. Previously, this URL couldn't be configured which was causing problems on the machines that didn't have access to repo1.maven.org.
Thanks to tgodzik's work from now on it's possible to define metals.coursierMirror
property.
More information about mirrors can be found at coursier documentation.
Miscellaneous
- Show implicit decorations in worksheets #3582 (tgodzik)
- Add current env variables to bloopInstall #3662 (tgodzik)
- Fix issues with Ammonite multistage scripts #3627 (tgodzik)
- Print information about candidates searched when missing JDK sources #3606 (tgodzik)
Contributors
Big thanks to everybody who contributed to this release or reported an issue!
$ git shortlog -sn --no-merges v0.11.1..v0.11.2
37 Tomasz Godzik
24 Vadim Chelyshov
22 Scala Steward
15 Arthur McGibbon
8 Kamil Podsiadlo
7 ckipp01
6 Kamil Podsiadło
1 Martin Duhem
1 Adrien Piquerez
1 Jerome Wuerf
1 Hugo van Rijswijk
Merged PRs
v0.11.2 (2022-03-08)
Merged pull requests:
- Go to definition of synthetic symbols. #3683 (olafurpg)
- Don't watch entire workspace on MacOS #3665 (Duhemm)
- fix: Add test case for topelevel tuple hover #3676 (tgodzik)
- Scala3 PC refactorings #3651 (dos65)
- fix: Add tests for Scala 3 toplevel enums #3674 (tgodzik)
- chore: fix flaky test provider suite #3673 (kpodsiad)
- Update scribe, scribe-file, scribe-slf4j to 3.8.0 #3669 (scala-steward)
- Update mdoc-interfaces to 2.3.1 #3672 (scala-steward)
- Update mdoc, mdoc-interfaces, sbt-mdoc to 2.3.1 #3671 (scala-steward)
- Update sbt-buildinfo to 0.11.0 #3667 (scala-steward)
- Update guava to 31.1-jre #3668 (scala-steward)
- Update flyway-core to 8.5.1 #3670 (scala-steward)
- fix: Add test case when using Left class and Scala 3 #3666 (tgodzik)
- Change hashing to lastModified #3611 (tgodzik)
- Update Bloop to 1.4.13 #3664 (tgodzik)
- Fix issues with nightlies tests #3663 (tgodzik)
- fix: do not show test explorer related error for client which don't implement it #3661 (kpodsiad)
- Add current env variables to bloopInstall #3662 (tgodzik)
- docs: add a post about release-related changes #3653 (dos65)
- fix: support Scala 2.11 PC on jdk higher than 8 #3658 (dos65)
- feat: allow running single test #3619 (kpodsiad)
- Bump scalameta to 4.5.0 #3652 (tgodzik)
- Change displayBuildTarget to listBuildTargets #3649 (Arthurm1)
- Fix issues in tests for Scala 3 Nightlies #3650 (tgodzik)
- fix: release workflow - prevent parallel publishing to sonatype #3644 (dos65)
- Cancel PRs automatically if new commits are pushed #3646 (tgodzik)
- fix: check scala3 nigtly - exclude existing latest #3645 (dos65)
- Scala3 emptyline completions #3629 (dos65)
- Update millw to 0.4.2 #3641 (tgodzik)
- fix: actions, discover new scala3 nigtly properly #3640 (dos65)
- Fix FileDecoderProviderLspSuite to work locally #3639 (tgodzik)
- Update scribe, scribe-file, scribe-slf4j to 3.7.1 #3634 (scala-steward)
- Fix showing virtual docs in jars with paths that need escaping #3632 (tgodzik)
- Update undertow-core to 2.2.16.Final #3635 (scala-steward)
- Update flyway-core to 8.4.4 #3636 (scala-steward)
- Update ammonite-util to 2.5.2 #3633 (scala-steward)
- Update sbt, scripted-plugin to 1.6.2 #3638 (scala-steward)
- Update xnio-nio to 3.8.6.Final #3637 (scala-steward)
- Index non-scala target dependency sources #3628 (Arthurm1)
- Fix issues with Ammonite multistage scripts #3627 (tgodzik)
- View source jar files as virtual docs #3143 (Arthurm1)
- Bump debug-adapter to 2.0.13 #3626 (adpi2)
- docs: provide latest versions #3618 (dos65)
- docs: describe how to add new Scala version support to the existing release #3617 (dos65)
- feat, refactor: use notification to send test updates #3554 (kpodsiad)
- Display build target info #3380 (Arthurm1)
- scalafmt - newlines.inInterpolation = avoid #3614 (dos65)
- refactor: [Scala 3] Extract hover to a separate file #3613 (tgodzik)
- chore(fmt): bump scalafmt to 3.4.0 #3610 (ckipp01)
- fix: compare long numbers in TVP #3607 (kpodsiad)
- Update scribe to 3.6.10 #3598 (tgodzik)
- Ignore UncheckedIOException coming from broken source jars #3609 (tgodzik)
- Print information about candidates searched when missing JDK sources #3606 (tgodzik)
- feat: add range to symbol definition #3605 (kpodsiad)
- Revert to Mdoc 2.2.24 for Scala 2.11 #3601 (tgodzik)
- chore(ci): update setup-action #3603 (ckipp01)
- Migrate to the newest H2 version #3595 (tgodzik)
- refactor:
SemanticdbFeatureProvider
trait #3602 (kpodsiad) - Do not insert inferred type on variable bound to another #3600 (tgodzik)
- Show implicit decorations in worksheets #3582 (tgodzik)
- Update scalameta, semanticdb-scalac, ... to 4.4.33 #3592 (scala-steward)
- Update mdoc, mdoc-interfaces, sbt-mdoc to 2.3.0 #3591 (scala-steward)
- Update flyway-core to 8.4.3 #3590 (scala-steward)
- Update ujson to 1.5.0 #3588 (scala-steward)
- Update geny to 0.7.1 #3587 (scala-steward)
- Update metaconfig-core to 0.10.0 #3585 (scala-steward)
- Fix goto definition for local synthetics #3580 (tgodzik)
- minor: remove non-relevant things #3564 (dos65)
- Make sure we only analyze stacktrace lines that do look the part #3578 (tgodzik)
- docs(ammonite): add note about ammonite support #3579 (ckipp01)
- Don't focus diagnotics if compialtion returned with error #3577 (tgodzik)
- Pass -Xsource:3 to scalafix organize-imports action if present #3574 (hugo-vrijswijk)
- Insert missing comma #3573 (ossScharom)
- cleanup: remove unused stuff from CompilerInterfaces #3572 (ckipp01)
- fix: add possibility to define callback for
BatchedFunction
#3571 (kpodsiad) - fix: Open other window when using Analyze Stacktrace #3540 (tgodzik)
- feature: Add support for Scala 3.1.2-RC1 #3569 (tgodzik)
- fix: [Scala 3] Show exact literal type #3567 (tgodzik)
- feature: [Scala 3] Add keyword completions #3560 (tgodzik)
- release: fix last 5 nigtly version selection #3558 (dos65)
- Add support for Scala 3.1.1 #3555 (tgodzik)
- actions: mtags release adjustments #3557 (dos65)
- [Actions] Mtags publishing - move all logic to ci-script #3553 (dos65)
- docs: mention about pre-release version of Metals extension #3552 (kpodsiad)
- [Actions] Mtags release #3551 (dos65)
- docs: Add docs for discover-test-suites #3546 (ckipp01)
- docs: add a small note about decode not working on extra file types. #3549 (ckipp01)
- [Actions] Scala3 Nightly check - yet another fix #3548 (dos65)
- [Actions] One more fix to check_scala3_nightly job #3547 (dos65)
- Compare only uppercase MD5 #3545 (tgodzik)
- [JavaInteractiveSemanticdb] Add test-case to cover --patch-module flag usage #3538 (dos65)
- [Actions] Install coursier for nightly checks #3543 (dos65)
- refactor: check lowercase test-user-interface #3544 (ckipp01)
- [Actions] Trigger Scala3-nightly mtags publishing automatically #3541 (dos65)
- Add release notes for 0.11.1 #3524 (tgodzik)