Skip to content

Metals V1 - SBT 2 BSP: Compilation errors are not reported through the normal avenues #8539

Description

@markehammons

Describe the bug

Use SBT 2.0.0 as the BSP, put in code that doesn't compile.
In the output tab, this is printed:

org.eclipse.lsp4j.jsonrpc.ResponseErrorException: (haven-collaboration / Compile / �[31mcompileIncremental�[0m) sbt.util.CachedCompileFailure$$anon$1: Compilation failed
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleResponse(RemoteEndpoint.java:214)
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:198)
	at scala.meta.internal.metals.RequestMonitorImpl$$anon$1.consume(ServerLivenessMonitor.scala:41)
	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(StreamMessageProducer.java:189)
	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:97)
	at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:97)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:545)
	at java.util.concurrent.FutureTask.run(FutureTask.java:328)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1090)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:614)
	at java.lang.Thread.run(Thread.java:1474)

Expected behavior

Underlining of compilation errors.

Operating system

Linux

Editor/Extension

VS Code

Version of Metals

v1.6.7

Scala version/s

3.8.4

Extra context or search terms

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    sbtGeneric relation to sbtsbt serverRelates to sbt BSP server supportupstream-fix-neededWaiting on a fix upstream

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions