java.util.concurrent.ExecutionException: org.eclipse.lsp4j.jsonrpc.ResponseErrorException: DecodingFailure(Attempt to decode value on failed cursor, List(DownField(providesFileWatching), DownField(capabilities)))
at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1915)
at scala.meta.internal.metals.BuildServerConnection$.initialize(BuildServerConnection.scala:176)
at scala.meta.internal.metals.BuildServerConnection$.fromStreams(BuildServerConnection.scala:129)
at scala.meta.internal.metals.BloopServers.$anonfun$newServer$1(BloopServers.scala:71)
at scala.util.Success.$anonfun$map$1(Try.scala:255)
at scala.util.Success.map(Try.scala:213)
at scala.concurrent.Future.$anonfun$map$1(Future.scala:292)
at scala.concurrent.impl.Promise.liftedTree1$1(Promise.scala:33)
at scala.concurrent.impl.Promise.$anonfun$transform$1(Promise.scala:33)
at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:64)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.eclipse.lsp4j.jsonrpc.ResponseErrorException: DecodingFailure(Attempt to decode value on failed cursor, List(DownField(providesFileWatching), DownField(capabilities)))
at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleResponse(RemoteEndpoint.java:209)
at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:193)
at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(StreamMessageProducer.java:194)
at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:94)
at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:113)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
sbt:OrderService> scalafix RemoveUnused
[info] Running scalafix on 10 Scala sources
[info] Running scalafix on 6 Scala sources
[info] Running scalafix on 3 Scala sources
[info] Running scalafix on 50 Scala sources
[success] Total time: 1 s, completed Dec 17, 2019 12:35:41 PM
@BBartosz you can generate programs by constructing trees and printing them with Scalameta. Macros allow you to do roughly the same thing, except you do it during the compilation of your program
How exactly you generate them? I understand that you use quasiquotes to build your tree and then you save it to file, kinda like string?
Hi all, wondering if someone could clarify the behavior of the semanticdb-scalac plugin for me. I'm running this command:
$ ~/Downloads/scala-2.13.1/bin/scalac -Xplugin:$(realpath ~/Downloads/semanticdb-scalac_2.13.1-4.3.0.jar) -Yrangepos -Xplugin-require:semanticdb HelloWorld.scala
I'm expecting to see semanticdb files in META-INF/semanticdb
, but I do not. In fact, if I create the META-INF/semanticdb
directory before running the above command, the semanticdb
directory is deleted.
targetroot
option as well❯ cs launch scala:2.13.1 -- -Xplugin:$(cs fetch --intransitive org.scalameta:semanticdb-scalac_2.13.1:4.3.7) -Yrangepos -Xplugin-require:semanticdb -P:semanticdb:targetroot:$(pwd) foo.scala
❯ tree
.
├── foo.scala
└── META-INF
└── semanticdb
└── foo.scala.semanticdb
cs
is coursier from https://get-coursier.io/docs/cli-overview