Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Update Metals version to 1.3.3 #1520

Merged
merged 1 commit into from
Jul 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 46 additions & 29 deletions packages/metals-vscode/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down
5 changes: 2 additions & 3 deletions packages/metals-vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down Expand Up @@ -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"
},
Expand Down
Loading