Open niander opened 1 week ago
Looks like while testing on Windows I get some similar errors:
java.util.concurrent.CompletionException: java.lang.IllegalArgumentException: Illegal character in opaque part at index 185: jar:file:///C:/Users/tomas/AppData/Local/Coursier/cache/arc/https/github.com/adoptium/temurin17-binaries/releases/download/jdk-17%2B35/OpenJDK17-jdk_x64_windows_hotspot_17_35.zip/jdk-17 35/lib/src.zip!/java.base/jdk/internal/misc/Unsafe.java
at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:332)
at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:347)
at java.base/java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:708)
at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510)
at java.base/java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:2162)
at scala.meta.internal.metals.CancelTokens$.$anonfun$future$1(CancelTokens.scala:40)
at scala.meta.internal.metals.CancelTokens$.$anonfun$future$1$adapted(CancelTokens.scala:38)
at scala.concurrent.impl.Promise$Transformation.run(Promise.scala:484)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.IllegalArgumentException: Illegal character in opaque part at index 185: jar:file:///C:/Users/tomas/AppData/Local/Coursier/cache/arc/https/github.com/adoptium/temurin17-binaries/releases/download/jdk-17%2B35/OpenJDK17-jdk_x64_windows_hotspot_17_35.zip/jdk-17 35/lib/src.zip!/java.base/jdk/internal/misc/Unsafe.java
at java.base/java.net.URI.create(URI.java:906)
at scala.meta.internal.mtags.MtagsEnrichments$XtensionStringMtags.toAbsolutePath(MtagsEnrichments.scala:177)
at scala.meta.internal.mtags.MtagsEnrichments$XtensionStringMtags.$anonfun$toAbsolutePath$3(MtagsEnrichments.scala:174)
at scala.meta.internal.mtags.MtagsEnrichments$XtensionStringMtags.withTryDecode$1(MtagsEnrichments.scala:153)
at scala.meta.internal.mtags.MtagsEnrichments$XtensionStringMtags.toAbsolutePath(MtagsEnrichments.scala:174)
at scala.meta.internal.metals.MetalsEnrichments$XtensionString.toAbsolutePath(MetalsEnrichments.scala:741)
at scala.meta.internal.metals.MetalsEnrichments$XtensionString.toAbsolutePath(MetalsEnrichments.scala:738)
at scala.meta.internal.metals.MetalsLspService.$anonfun$documentSymbol$1(MetalsLspService.scala:1521)
at scala.meta.internal.metals.CancelTokens$.$anonfun$apply$2(CancelTokens.scala:26)
at scala.concurrent.Future$.$anonfun$apply$1(Future.scala:687)
at scala.concurrent.impl.Promise$Transformation.run(Promise.scala:467)
... 3 more
Caused by: java.net.URISyntaxException: Illegal character in opaque part at index 185: jar:file:///C:/Users/tomas/AppData/Local/Coursier/cache/arc/https/github.com/adoptium/temurin17-binaries/releases/download/jdk-17%2B35/OpenJDK17-jdk_x64_windows_hotspot_17_35.zip/jdk-17 35/lib/src.zip!/java.base/jdk/internal/misc/Unsafe.java
at java.base/java.net.URI$Parser.fail(URI.java:2974)
at java.base/java.net.URI$Parser.checkChars(URI.java:3145)
at java.base/java.net.URI$Parser.parse(URI.java:3181)
at java.base/java.net.URI.<init>(URI.java:623)
at java.base/java.net.URI.create(URI.java:904)
... 13 more
@niander, I tried adding a potential fix for this, does the issue persist on the newest snapshot?
Describe the bug
When using "goto" for a symbol from a dependency that was installed using coursier. I see several reports of errors and exceptions when it seems it is trying to read the downloaded source files of the dependencies.
It seems this happens because the path where coursier download dependencies will include
@
if the feed source is one hosted in Azure Artifacts. If I try to open the path on windows it won't work, it must be opened with%40
instead.If I change my SBT build configuration to not use coursier, the same thing doesn't happen because I am assuming the path where dependencies are downloaded doesn't have
@
in it.Expected behavior
No errors from logs
Operating system
Windows
Editor/Extension
VS Code
Version of Metals
v1.3.2
Extra context or search terms
No response