Metals v0.8.1 - Cobalt
We are excited to announce the release of Metals v0.8.1. This release includes a large number of bug fixes and some new features.
Commits since last release | 313 |
Merged PRs | 100 |
Contributors | 19 |
Closed issues | 52 |
New features | 2 |
For full details: https://github.com/scalameta/metals/milestone/19?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!
- insert missing abstract members
- new file provider
- enable rename preview for Visual Studio Code
- debug and run working in Emacs
Insert missing abstract members
Thanks to yet again amazing work by tanishiking, we now support the quick fix code action for implementing abstract class members. This code action is available in case of errors and works in the same way as the recent "Implement all members" completion. It will add any missing abstract members at the top of the class with the default implementation of ???.
New file provider
In the last release we added support for worksheets, which are an easy way to
quickly evaluate some code. To create a new worksheet you need to create a file
with the extension .worksheet.sc
, which was not that easy to figure out. To
fix that situation, thanks to
alekseiAlefirov, we now have a menu to
create different types of new files including classes, traits, object, package
objects and of course worksheets. At this time it's only available in the Visual
Studio Code and coc-metals
extensions.
You can also just use the command Metals: New Scala File
, which will use the
current file's directory and create the new file there. And additionally, when
using a relative path like a/b/C
Metals will create all needed directories and
add a proper package declaration to the new file.
Enable rename preview for Visual Studio Code
Rename previews were added in the last Visual Studio Code release, which enable users to see what will be changed when a rename is executed. Due to optimization and UX reasons Metals renamed symbols in closed files in the background without informing the editor. However, this also causes the previews to be misleading, since they might not be complete.
To fix that situation we now send all the files to VS Code, which then is able to display the preview. We do it, however, for up to 300 files, which threshold was experimentally estimated. When the number of files reaches over that number, we revert to the old behavior of not opening closed files. The reason for this is that in some cases for larger numbers of files the editor could hang and become unresponsive.
Debug in Emacs
In the last release run and debug support was only available for Visual Studio Code, but thanks to amazing work by the contributors it is now possible to use it in Emacs via lsp-mode's metals settings and dap-mode.
Other changes
This release includes mostly fixes and minor features, which is due to the large scope of the last one. We concentrated this last month on stability and making sure everything is up to scratch. Those minor changes included:
- use bloop.export-jar-classifiers property when importing the build from sbt
- ignore bad compiler options passed by users in order not to break completions
- add an override for the Bloop plugin version and promote it to LSP settings
- fix onTypeFormatting when used in top level multi-line strings
- fix issues when
go to implementation
resolves local symbols - change the non-fatal jar error to debug rather than log warning
- add support for worksheets without a build target by defaulting to Metals Scala version
- rename file only if the renamed symbol is directly enclosed by a package
- fix exhaustive match completion on Java enums
- use workspace level Gradle wrapper if present for bloopInstall
- fix onTypeFormatting issue with multiple pipes on a line
- fix rename issues with backticks
- add documentation on how to use proxies and mirrors
Contributors
Big thanks to everybody who contributed to this release!
Again, we have some new contributors and a lot of returning ones!
$ git shortlog -sn --no-merges v0.8.0..v0.8.1
Olafur Pall Geirsson
Tomasz Godzik
Scala Steward
Chris Kipp
Gabriele Petronella
Rikito Taniguchi
Aleksei Alefirov
Jakub Kozłowski
Arthur McGibbon
Carlos Rodriguez Guette
Danil Bykov
Jakob Odersky
Joris
Martin Duhem
Ruslans Tarasovs
Win Wang
joriscode
Kei Sunagawa
Zainab Ali
Merged PRs
v0.8.1 (2020-02-26)
Merged pull requests:
- add openFilesOnRenameProvider to experimental #1463 (ckipp01)
- Add new LSP extension 'metals/pickInput' to implement the "Create Scala file" command #1447 (alekseiAlefirov)
- Restart the Bloop server for Pants users if it's running a known old version #1460 (olafurpg)
- Polishing touches on Pants integration #1459 (olafurpg)
- Fix issues discovered while testing out IntelliJ integration. #1457 (olafurpg)
- add in checkmark for debug on emacs #1458 (ckipp01)
- Make use of latest Pants and Bloop improvements #1452 (olafurpg)
- add properties back in #1455 (ckipp01)
- Record visited Scala files to make sure they are not duplicated #1451 (tgodzik)
- Move some properties to clientExperimentalCapabilities #1414 (ckipp01)
- Use proper range for references with backticks #1430 (tgodzik)
- Make sure we properly handle overflow events even if the path is null #1435 (tgodzik)
- Rename "link" subcommand to "switch" #1446 (olafurpg)
- Fix typo: s/lastVisistedParentTrees/lastVisitedParentTrees/ #1444 (tanishiking)
- Update sbt-munit to 0.5.2 #1443 (scala-steward)
- Update sbt-munit to 0.5.0 #1442 (scala-steward)
- Add missing config in Eglot #1441 (carlosrogue)
- Update scalafmt-dynamic to 2.4.1 #1440 (scala-steward)
- Mark most often failing tests as flaky and fix DefinitionLspSuite test #1439 (tgodzik)
- Update scalafmt-dynamic to 2.4.0 #1437 (scala-steward)
- Fix download URL for Coursier command-line interface #1436 (keiSunagawa)
- Document emacs integration with debug adapter and tree view protocol #1438 (zainab-ali)
- Update bloop-config, bloop-launcher to 1.4.0-RC1-62-d098adda #1434 (scala-steward)
- Refactor: split Completions.scala into smaller files #1423 (tanishiking)
- Update bloop-config, bloop-launcher to 1.4.0-RC1-56-a2040035 #1429 (scala-steward)
- Fix issue with multiple pipes in string #1427 (tgodzik)
- Return all rename file changes up to a threshold #1405 (tgodzik)
- Update flyway-core to 6.2.3 #1426 (scala-steward)
- Update metaconfig-core to 0.9.8 #1425 (tgodzik)
- Send stackTraces as paths rather than URIs #1418 (danilbykov)
- Revamp the BloopPants command-line interface. #1420 (olafurpg)
- Update ujson to 0.9.9 #1419 (scala-steward)
- CodeAction: insert missing abstract members #1379 (tanishiking)
- Don't insert parentheses when importing #1284 (kubukoz)
- Change config options to match coc #1390 (ckipp01)
- Use workspace level Gradle wrapper if present #1412 (Arthurm1)
- Update sbt-ci-release to 1.5.2 #1408 (scala-steward)
- Update jsoup to 1.12.2 #1410 (scala-steward)
- Remove check for focused document on non-supporting editors #1407 (ckipp01)
- Added Command to create new worksheet #1339 (alekseiAlefirov)
- Add in tree view protocol docs for vim #1392 (ckipp01)
- Improve logic to merge Pants targets. #1400 (olafurpg)
- Update pprint to 0.5.9 #1403 (scala-steward)
- Update flyway-core to 6.2.2 #1401 (scala-steward)
- Do not accept empty string values from the lsp settings #1397 (tgodzik)
- Enable verbose sbt loggers in CI. #1399 (olafurpg)
- Fix exhaustive match completion on Java enums #1393 (Duhemm)
- Update munit, sbt-munit to 0.4.5 #1395 (scala-steward)
- Add .scalafmt.conf symbolic link when exporting Pants build. #1386 (olafurpg)
- Avoid long filename for Pants output file. #1385 (olafurpg)
- Update interface to 0.0.18 #1383 (scala-steward)
- Update sbt, scripted-plugin to 1.3.8 #1384 (scala-steward)
- Rename file only if renamed symbol is directly enclosed by a package (closes #1380) #1382 (kubukoz)
- Several improvements to Pants integration #1375 (olafurpg)
- Include ScalaBuildTarget in ScalaTarget #1374 (tgodzik)
- Upgrade bloop-launcher to nightly version of Bloop. #1371 (olafurpg)
- Mark flaky tests as flaky. #1373 (olafurpg)
- Update flyway-core to 6.2.1 #1372 (scala-steward)
- Upgrade to the latest junit-interface. #1368 (olafurpg) Cannot read PR 1352
- Add support for rambo worksheets without build target #1364 (tgodzik)
- Add documentation for using proxy and mirrors #1356 (tgodzik)
- Merge pull request #1363 from olafurpg/pants-resources #1363 (olafurpg) Cannot read PR 1361
- Start recording test reports with sbt-munit #1360 (olafurpg)
- Update munit to 0.4.3 #1358 (scala-steward)
- Fix testAsync -> test after a logical merge conflict #1357 (tgodzik)
- Do not accept synthetic symbol with matching qualifier #1338 (tgodzik)
- Replace utest with MUnit #1277 (gabro)
- Update interface to 0.0.17 #1355 (scala-steward)
- Update jol-core to 0.10 #1351 (scala-steward)
- Update nuprocess to 1.2.6 #1350 (scala-steward)
- Several Pants fixes #1349 (olafurpg)
- Copy jars from Pants export-classpath into Bloop directory. #1348 (olafurpg)
- Resolve uri from path properly for setting breakpoints #1346 (tgodzik)
- Update Nu Process to 1.2.5 and directory watcher to 0.9.9 #1340 (tgodzik)
- Update flyway-core to 6.2.0 #1344 (scala-steward)
- Updated "unsupported features" #1343 (rtar)
- fix logic for detected if bloop-sbt is already installed #1342 (ckipp01)
- Add caching to github actions for Cousier #1276 (tgodzik)
- Mention debugging in contributing docs #1337 (kubukoz)
- Make sure the path on windows is a proper URI #1335 (tgodzik)
- Change last require in PC to warning #1333 (tgodzik)
- Change the non-fatal jar error to debug rather than log warning #1331 (ckipp01)
- Fix issues when go to implementation resolves local symbols #1330 (tgodzik)
- Use actual mill version in predef #1307 (jodersky)
- Update recommended mappings with the latest #1289 (ckipp01)
- Add in fix for onTypeFormatting on top level multi-line strings #1329 (ckipp01)
- Update lz4-java to 1.7.1 #1327 (scala-steward)
- Add an override for build tool plugin version and promote LSP settings #1310 (tgodzik)
- Change require to warning for the presentation compiler #1324 (tgodzik)
- Fix version of sbt-metals for pre 0.8.0 instructions #1323 (gabro)
- Update sbt, scripted-plugin to 1.3.7 #1319 (scala-steward)
- Typo #1318 (joriscode)
- Fix worksheet gif for cobalt release notes to show proper extension #1314 (tgodzik)
- Update versions in issue templates #1312 (ckipp01)
- Use bloop.export-jar-classifiers property #1212 (joriscode)
- Update screen-record of Scaladoc auto-completion in v0.8.0 release-note. #1309 (tanishiking)
- Update ujson to 0.9.8 #1299 (scala-steward)
- Link authors' github accounts for release notes #1295 (tgodzik)
- Remove nix publishing and add a reminder to update version #1294 (tgodzik)
- Add release notes for the epic version of Metals :D #1278 (tgodzik)