Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use file:/// instead of file:/ for BSP URIs #728

Closed
olafurpg opened this issue Nov 21, 2018 · 0 comments
Closed

Use file:/// instead of file:/ for BSP URIs #728

olafurpg opened this issue Nov 21, 2018 · 0 comments
Labels
bug A defect or misbehaviour. build server Any issue or pull request that has to do with hot compilers or BSP.

Comments

@olafurpg
Copy link
Contributor

- obtained
+ expected
{
  "jsonrpc": "2.0",
  "method": "build/publishDiagnostics",
  "params": {
    "textDocument": {
-      "uri": "file:/Users/olafurpg/dev/metals/test-workspace/src/main/scala/example/User.scala"
+      "uri": "file:///Users/olafurpg/dev/metals/test-workspace/src/main/scala/example/User.scala"
    },

The difference seems to be between Path.toUri and File.toURI

@ Paths.get("build.sbt").toAbsolutePath.toUri
res1: java.net.URI = file:///Users/olafurpg/dev/metals/build.sbt
@ new java.io.File("build.sbt").toURI
res2: java.net.URI = file:/Users/olafurpg/dev/metals/build.sbt
@jvican jvican added bug A defect or misbehaviour. build server Any issue or pull request that has to do with hot compilers or BSP. labels Nov 21, 2018
@jvican jvican closed this as completed in 64c47b8 Nov 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A defect or misbehaviour. build server Any issue or pull request that has to do with hot compilers or BSP.
Projects
None yet
Development

No branches or pull requests

2 participants