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

Unexpected -J prefix in debugSession/start request #2489

Closed
adpi2 opened this issue Feb 9, 2021 · 1 comment · Fixed by #2522
Closed

Unexpected -J prefix in debugSession/start request #2489

adpi2 opened this issue Feb 9, 2021 · 1 comment · Fixed by #2522
Labels
tech debt We should have addressed this yesterday upstream-fix-needed Waiting on a fix upstream

Comments

@adpi2
Copy link
Member

adpi2 commented Feb 9, 2021

Describe the bug

When starting a debug session, Metals add a -J prefix to all the jvm options. This was originally made for Bloop in #1781. The problem is that it's an implementation detail of Bloop that should not leak out of it.

To Reproduce

Steps to reproduce the behavior:

  1. Create the run properties
{
    "type": "scala",
    "request": "launch",
    "name": "MyMain",
    "mainClass": "com.example.MyMain",
    "args": [],
    "jvmOptions": ["-Dconfig.file=/path/to/config/file"]
 }
  1. Activate BSP tracing by creating the /home/piquerez/.cache/metals/bsp.trace.json
  2. Click the run button above the com.example.MyMain class
  3. The debugSession/start request in the BSP traces contains:
"jvmOptions": [
  "-J-Dconfig.file=/path/to/config/file"
],

Expected behavior

Metals should not add the -J prefix

Installation:

  • Operating system: macOS/Windows/Linux
  • Editor: Visual Studio Code/Atom/Vim/Sublime/Emacs
  • Metals version: v0.9.10
@tgodzik
Copy link
Contributor

tgodzik commented Feb 9, 2021

Thanks for reporting! Let's fix it once the Bloop PR is merged and released.

@tgodzik tgodzik added tech debt We should have addressed this yesterday upstream-fix-needed Waiting on a fix upstream labels Feb 9, 2021
@tgodzik tgodzik added this to the Metals v0.10.0 milestone Feb 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tech debt We should have addressed this yesterday upstream-fix-needed Waiting on a fix upstream
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants