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

Scala Script: "run | debug" button doesn't show up on VS Code metals after upgrading to Scala-Cli 1.2.2 #2864

Closed
ashwinbhaskar opened this issue Apr 18, 2024 · 9 comments
Labels
bug Something isn't working IDE

Comments

@ashwinbhaskar
Copy link

ashwinbhaskar commented Apr 18, 2024

Version(s)
Scala-Cli version: 1.2.2
Metals version: 1.3.0
Bsp version: 2.1.1

Describe the bug
After upgrading scala-cli to version 1.2.2 the "run | debug" button has stopped showing up on VS Code (metals extension). This happens only for .sc files, .scala files show the "run | debug" button.

To Reproduce
Use scala-cli 1.2.2 with metals 1.3.0 in VS Code. Below is my .bsp/scala-cli.json file contents

  "name": "scala-cli",
  "argv": [
    "/opt/homebrew/bin//scala-cli",
    "bsp",
    "--json-options",
    "<Home>/scripts/scala-cli-scripts/.scala-build/ide-options-v2.json",
    "<Home>/scripts/scala-cli-scripts"
  ],
  "version": "1.2.2",
  "bspVersion": "2.1.1",
  "languages": [
    "scala",
    "java"
  ]
}

Expected behaviour
"run | debug" button should appear on .sc files too

image
@ashwinbhaskar ashwinbhaskar added the bug Something isn't working label Apr 18, 2024
@Gedochao
Copy link
Contributor

cc @tgodzik @kasiaMarek

@Gedochao Gedochao added the IDE label Apr 18, 2024
@tgodzik
Copy link
Member

tgodzik commented Apr 30, 2024

@ashwinbhaskar I can't reproduce the issue, is it possible that run | debug code lenses hid above line 1? I think other people had this issue and would probably be better if we were able to show run on the left of the code.

@ashwinbhaskar
Copy link
Author

@tgodzik umm, not sure. How do I check if it's hidden above line 1?

@tgodzik
Copy link
Member

tgodzik commented May 2, 2024

Just scroll to the top, however this might not be the actual reason. The code should also compile and there should be something in the logs about connecting to scala-cli

@ashwinbhaskar
Copy link
Author

@tgodzik No change on scrolling to the top. The code compiles and works as I can run it using scala-cli run <MyFile>.

@tgodzik
Copy link
Member

tgodzik commented May 6, 2024

Any logs or error reports in .metals/reports?

@ashwinbhaskar
Copy link
Author

ashwinbhaskar commented May 10, 2024

I don't have a .metals/reports file. I have a .metals/metals.log file. There are no errors in it. It prints the following INFO logs

2024.05.10 09:22:20 INFO  time: Connected to build server in 1m14s
2024.05.10 09:22:20 INFO  Connected to Build server: scala-cli v1.2.2
2024.05.10 09:22:23 INFO  time: indexed workspace in 2.6s
2024.05.10 09:23:20 INFO  BSP server: [hint] "async-http-client-backend-zio is outdated, update to 3.9.6"
2024.05.10 09:23:20 INFO  BSP server: [hint]      async-http-client-backend-zio 3.8.15 -> com.softwaremill.sttp.client3::async-http-client-backend-zio:3.9.6
2024.05.10 09:23:20 INFO  BSP server: [hint] //> using dependency "com.softwaremill.sttp.client3::async-http-client-backend-zio:3.8.15"
2024.05.10 09:23:20 INFO  BSP server: [hint]                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024.05.10 09:23:20 INFO  BSP server: [hint] ./project.scala:10:23
2024.05.10 09:23:20 INFO  BSP server: [hint] "core is outdated, update to 3.9.6"
2024.05.10 09:23:20 INFO  BSP server: [hint]      core 3.8.15 -> com.softwaremill.sttp.client3::core:3.9.6
2024.05.10 09:23:20 INFO  BSP server: [hint] //> using dependency "com.softwaremill.sttp.client3::core:3.8.15"
2024.05.10 09:23:20 INFO  BSP server: [hint]                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024.05.10 09:23:20 INFO  BSP server: [hint] ./project.scala:11:23
2024.05.10 09:23:20 INFO  BSP server: [hint] "slf4j-backend is outdated, update to 3.9.6"
2024.05.10 09:23:20 INFO  BSP server: [hint]      slf4j-backend 3.8.15 -> com.softwaremill.sttp.client3::slf4j-backend:3.9.6
2024.05.10 09:23:20 INFO  BSP server: [hint] //> using dependency "com.softwaremill.sttp.client3::slf4j-backend:3.8.15"
2024.05.10 09:23:20 INFO  BSP server: [hint]                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024.05.10 09:23:20 INFO  BSP server: [hint] ./project.scala:12:23
2024.05.10 09:23:20 INFO  BSP server: [hint] "zio-interop-reactivestreams is outdated, update to 2.0.2"
2024.05.10 09:23:20 INFO  BSP server: [hint]      zio-interop-reactivestreams 2.0.1 -> dev.zio::zio-interop-reactivestreams:2.0.2
2024.05.10 09:23:20 INFO  BSP server: [hint] //> using dependency "dev.zio::zio-interop-reactivestreams:2.0.1"
2024.05.10 09:23:20 INFO  BSP server: [hint]                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024.05.10 09:23:20 INFO  BSP server: [hint] ./project.scala:13:23
2024.05.10 09:23:20 INFO  BSP server: [hint] "zio-streams is outdated, update to 2.1.0"
2024.05.10 09:23:20 INFO  BSP server: [hint]      zio-streams 2.0.13 -> dev.zio::zio-streams:2.1.0
2024.05.10 09:23:20 INFO  BSP server: [hint] //> using dependency "dev.zio::zio-streams:2.0.13"
2024.05.10 09:23:20 INFO  BSP server: [hint]                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024.05.10 09:23:20 INFO  BSP server: [hint] ./project.scala:14:23
2024.05.10 09:23:20 INFO  BSP server: [hint] "zio is outdated, update to 2.1.0"
2024.05.10 09:23:20 INFO  BSP server: [hint]      zio 2.0.13 -> dev.zio::zio:2.1.0
2024.05.10 09:23:20 INFO  BSP server: [hint] //> using dependency "dev.zio::zio:2.0.13"
2024.05.10 09:23:20 INFO  BSP server: [hint]                       ^^^^^^^^^^^^^^^^^^^
2024.05.10 09:23:20 INFO  BSP server: [hint] ./project.scala:18:23
2024.05.10 09:23:20 INFO  BSP server: [hint] "kafka-clients is outdated, update to 3.7.0"
2024.05.10 09:23:20 INFO  BSP server: [hint]      kafka-clients 3.6.1 -> org.apache.kafka:kafka-clients:3.7.0
2024.05.10 09:23:20 INFO  BSP server: [hint] //> using dependency "org.apache.kafka:kafka-clients:3.6.1"
2024.05.10 09:23:20 INFO  BSP server: [hint]                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024.05.10 09:23:20 INFO  BSP server: [hint] ./project.scala:20:23
2024.05.10 09:23:20 INFO  BSP server: [hint] "redisson is outdated, update to 3.29.0"
2024.05.10 09:23:20 INFO  BSP server: [hint]      redisson 3.15.0 -> org.redisson:redisson:3.29.0
2024.05.10 09:23:20 INFO  BSP server: [hint] //> using dependency "org.redisson:redisson:3.15.0"
2024.05.10 09:23:20 INFO  BSP server: [hint]                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024.05.10 09:23:20 INFO  BSP server: [hint] ./project.scala:21:23
2024.05.10 09:23:20 INFO  BSP server: [hint] "slf4j-api is outdated, update to 2.0.13"
2024.05.10 09:23:20 INFO  BSP server: [hint]      slf4j-api 1.7.36 -> org.slf4j:slf4j-api:2.0.13
2024.05.10 09:23:20 INFO  BSP server: [hint] //> using dependency "org.slf4j:slf4j-api:1.7.36"
2024.05.10 09:23:20 INFO  BSP server: [hint]                       ^^^^^^^^^^^^^^^^^^^^^^^^^^

@tgodzik
Copy link
Member

tgodzik commented May 13, 2024

Is there anything after that? Any logs that the code compiled? I don't have any idea what might be going on. If you could it would be awesome to get a reproduction. Could you also try on the newest version of Scala CLI?

Another thing that is curious is that it took so long to connect to the build server. It should be reasonably quick.

@Gedochao
Copy link
Contributor

We seem to be unable to reproduce this.
In case the problem persists, please open an issue upstream in https://github.com/scalameta/metals
Closing this here.

@Gedochao Gedochao closed this as not planned Won't fix, can't repro, duplicate, stale May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working IDE
Projects
None yet
Development

No branches or pull requests

3 participants