Closed ECEAthipanbose closed 4 months ago
Thanks for reporting! When I follow you instructions everything works fine, do you get any errors in your logs?
2024.02.17 19:57:27 WARN no build tool detected in workspace 'path/to/A6'. The most common cause for this problem is that the editor was opened in the wrong working directory, for example if you use sbt then the workspace directory should contain build.sbt. 2024.02.17 19:57:27 WARN Build server is not auto-connectable. 2024.02.17 19:57:50 INFO no build target found for 'path/to/A6/Sample.scala'. Using presentation compiler with project's scala-library version: 3.3.1 2024.02.17 19:57:50 WARN Could not find semantic tokens for: 'path/to/A6/Sample.scala' 2024.02.17 19:57:50 INFO time: code lens generation in 2.27s 2024.02.17 19:59:59 WARN Could not find semantic tokens for: 'path/to/A6/Sample.scala' 2024.02.17 20:00:10 WARN Could not find semantic tokens for: 'path/to/A6/Sample.scala' 2024.02.17 20:00:29 WARN no build target for: 'path/to/A6/Sample.scala' 2024.02.17 20:01:04 WARN no build target for: 'path/to/A6/Sample.scala' Feb 17, 2024 8:02:03 PM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint handleCancellation WARNING: Unmatched cancel notification for request id 69 2024.02.17 20:02:04 WARN no build target for: 'path/to/A6/Sample.scala'
see the figure no run|debug on main method and its not get compiled and iam manually debug through launch.json its tell no build target found on my workspace
Could you show the full log? Also what is you Metals version?
metals version 1.2.0+12-644090c2-SNAPSHOT
Could you check out the latest version? That's 1.2.2+27-c7759e1e-SNAPSHOT
or just latest stable 1.2.2
yeah work but rare time the same problem occur and tell no build target found in orkspace
there is any option to manually compile my whole workspace ?
You can always just use Scala CLI itself by running scala-cli setup-ide .
in the workspace root
To Reproduce:
Open VSCode. Open an empty folder (let's call it "A5"). Create a src folder inside the "A5" folder. Inside the src folder, create a main subfolder. Create a Sample.scala file inside the main subfolder. Paste some sample Scala code into Sample.scala. Observe that the .scala-build directory is not generated, and the Scala file is not compiled. Expected behavior:
The .scala-build directory should be generated automatically by the Metals extension. The Scala file (Sample.scala) should be compiled, allowing you to debug the sample code. and show the run|debug on main method