From 97085fc3b61146398bb5e60b7786ece34e720027 Mon Sep 17 00:00:00 2001 From: Tomasz Godzik Date: Fri, 12 Jul 2024 15:39:02 +0200 Subject: [PATCH] chore: Update Metals version to 3.3.3 --- packages/metals-vscode/README.md | 75 ++++++++++++++++++----------- packages/metals-vscode/package.json | 5 +- 2 files changed, 48 insertions(+), 32 deletions(-) diff --git a/packages/metals-vscode/README.md b/packages/metals-vscode/README.md index b76bca5d..d65d20fc 100644 --- a/packages/metals-vscode/README.md +++ b/packages/metals-vscode/README.md @@ -23,7 +23,7 @@ The following table shows the status of various features. | Code actions | ✅ | | | Organize imports | ✅ | | | Show implicits | ✅ | | -| Basic Java support | ✅ | Most feature aside from signature help and semantic tokens. | +| Basic Java support | ✅ | Most basic features aside from signature help and semantic tokens. | ## Requirements @@ -318,7 +318,37 @@ supported `Run` view. When using Metals the debugger itself is [Bloop](https://scalacenter.github.io/bloop/), which is also responsible for starting the actual process. -Users can begin the debugging session in two ways: +Users can begin the debugging session in four ways: + +### via test explorer + +Since version 0.11.0 Metals implements Visual Studio Code's +[Testing API](https://code.visualstudio.com/api/extension-guides/testing). + +Test Explorer UI is a new default way to run/debug test suites and replaces Code +Lenses. The new UI adds a testing view, which shows all test suites declared in +project's modules. From this panel it's possible to + +- view all discovered test suites grouped by build targets (modules) and filter + them +- run/debug test +- navigate to test's definition. + +![test-explorer](https://i.imgur.com/Z3VtS0O.gif) + +NOTE: While Metals detects test suites for most of existing testing frameworks, +support for recognizing individual tests is more limited. Metals supports the +current set of test frameworks when it comes to individual test discovery: + +- Junit +- MUnit +- Scalatest +- Weaver Test + +If you encounter an error, create an +[issue](https://github.com/scalameta/metals/issues). + +![test-explorer](https://i.imgur.com/Z3VtS0O.gif) ### via code lenses @@ -417,6 +447,20 @@ To assign shortcuts just go to the Keyboard Shortcuts page (`File` -> `Preferences` -> `Keyboard Shortcuts`) and search for a command, click on it and use your preferred shortcut. +### Defining jvm options + +Unfortunately, it's not always possible to define environment variables or jvm +options for tests. To work around that you can use: + +- `.jvmopts` file inside the main project directory or `JVM_OPTS` environment + variable. In this case, we will filter out any -X options as it might + sometimes be problematic if the file is also used for specifying build tools' + options. +- `.test-jvmopts` file or `TEST_JVM_OPTS` if you want to declare jvm options + only for your tests and/or you also want to use -X options. + +This will work for any method used to run tests. + ## On type formatting for multiline string formatting ![on-type](https://imgur.com/a0O2vCs.gif) @@ -563,33 +607,6 @@ can configure this shortcut: } ``` -## Test Explorer - -Metals 0.11.0 implements Visual Studio Code's -[Testing API](https://code.visualstudio.com/api/extension-guides/testing). - -Test Explorer UI is a new default way to run/debug test suites and replaces Code -Lenses. The new UI adds a testing view, which shows all test suites declared in -project's modules. From this panel it's possible to - -- view all discovered test suites grouped by build targets (modules) and filter - them -- run/debug test -- navigate to test's definition. - -![test-explorer](https://i.imgur.com/Z3VtS0O.gif) - -NOTE: While Metals detects test suites for most of existing testing frameworks, -support for recognizing individual tests is more limited. Metals supports the -current set of test frameworks when it comes to individual test discovery: - -- Junit -- MUnit -- Scalatest - -If you encounter an error, create an -[issue](https://github.com/scalameta/metals/issues). - ## Coming from IntelliJ Install the diff --git a/packages/metals-vscode/package.json b/packages/metals-vscode/package.json index 00957e54..bda9800f 100644 --- a/packages/metals-vscode/package.json +++ b/packages/metals-vscode/package.json @@ -220,7 +220,7 @@ "properties": { "metals.serverVersion": { "type": "string", - "default": "1.3.2", + "default": "1.3.3", "markdownDescription": "The version of the Metals server artifact. Requires reloading the window. \n\n**VS Code extension version is guaranteed to work only with the default version, change if you know what you're doing**" }, "metals.serverProperties": { @@ -405,8 +405,7 @@ "3.4.0", "3.3.3", "3.3.1", - "3.2.2", - "3.1.3" + "3.2.2" ], "markdownDescription": "The Scala compiler version that is used as the default or fallback in case a file doesn't belong to any build target or the specified Scala version isn't supported by Metals.\n\nThis applies to standalone Scala files, worksheets, and Ammonite scripts.\n\n The `automatic` value means that the Scala version for these files will be inferred from the highest supported Scala version in your projects build definition" },