Open yadavan88 opened 1 year ago
Further Update: It seems this issue occurs only with bloop. If I change the build server to SBT, it does show the pop-up as shown below.
Thanks for reporting! We need to check if we properly show when the build import failed, this should warrant at least a message for the user.
Hi, guys. Me and my colleagues looked into this issue and found out that bloopInstall ignores errors. Fix is here https://github.com/scalacenter/bloop/pull/1973
Describe the bug Metals with VSCode doesn't report any issue when there is an error with sbt import.
In my MacBook, I started using VsCode recently. However, if there is any issue with sbt import, it doesn't report it. I spent a lot of time trying to re-import, clean, compile and restart vs code. It was also not showing the "run/debug" annotation on the Main class. Later, when looking through the metals.log, I found out that there was actually import issue with one of the libraries. Once I fixed it, it started working.
To Reproduce Steps to reproduce the behavior:
Use this
build.sbt
and create a new projectThen create the Main class as:
Import and build the project in vscode. Run the code through metals "run" dialog and it should be all fine.
Then, change the library version to "4.0.0" instead of 3.0.4:
Import the project. You will see no error that it failed to resolve the dependency as 4.0.0 is available only for Scala 2.13.
The sbt import failure popup is not showing anymore
Expected behavior
Import successfully or show proper error message.
Screenshots
This is the screenshot after updating version Notice that there is no "run/debug" annotation.
Installation:
metals.serverVersion
) - 0.11.9Additional context
Search terms