scalameta / metals

Scala language server with rich IDE features 🚀
https://scalameta.org/metals/
Apache License 2.0
2.04k stars 318 forks source link

recent upgrade fails to run tests #6525

Open andyczerwonka opened 1 week ago

andyczerwonka commented 1 week ago

Describe the bug

With the upgrade yesterday to the most recent version, I'm not able to run tests from vscode.

Error occurred during initialization of VM
Initial heap size set to a larger value than the maximum heap size

Expected behavior

Tests should run, or the error should suggest where I can configure the setting.

Operating system

Other (note only the above 3 are officially supported)

Editor/Extension

VS Code

Version of Metals

v1.3.2

Extra context or search terms

No response

tgodzik commented 1 week ago

Looks like it's an issue with https://github.com/scalameta/metals/pull/6505 :/

Do you have any .jvmopts set? We need to have a separate one for tests I guess if this is indeed an issue

andyczerwonka commented 1 week ago

Yes, I have .jvmopts in my root. What's the workaround?

tgodzik commented 1 week ago

Yes, I have .jvmopts in my root. What's the workaround?

Remove it or decrease heap size. Somehow this doesn't work very well for tests. I will filter out -X options in a PR later

andyczerwonka commented 1 week ago

@tgodzik I can confirm that removing .jvmopts works, but I need the memory for running other things, e.g. sbt, utilities, etc.

tgodzik commented 1 week ago

Sorry about that, I am doing fix in https://github.com/scalameta/metals/pull/6526

However, I wonder if we can also figure out why it's failing for you. Could you post the .jvmopts you are using?

andyczerwonka commented 1 week ago

Not a show stopper, I'll just move to using SBT_OPTS for now and will be fine until the next release. Thanks!!!!

tgodzik commented 1 week ago

The PR is merged, you should be able to confirm on the snapshot, but would be great to figure out how the jvmopts were conflicting for the tests

Could you send us you .jvmopts file contents?