Buffer for "jumpDefinition" is empty in deno v1.7.5
yaegassy opened this issue · comments
Description
This may be a problem with "deno lsp" itself, but I would like to report it since it is not a problem with v1.7.4.
Also, I'm sorry if the problem is only with my environment.
However, we have confirmed that VSCode's vscode_deno v3.0.1
can "Go to definitions" even with deno v1.7.5.
DEMO
[OK] coc-deno + deno v1.7.4
[NG] coc-deno + deno v1.7.5 (empty buffer)
[OK] vscode_deno v3.0.1 + deno v1.7.5
Misc
An older version of deno can be downloaded from GitHub release.
Reproduced.
Additional Information
"deno" seems to be able to download binaries at the "commit hash" level. https://dl.deno.land/
I did some research based on that, and found that this symptom seems to be occurring from this commit. denoland/deno@2225e83
Properly caused by denoland/deno#9514 and denoland/deno@2225e83#diff-4ad030d88c2590103755c58d2eb7fab1c0ed94df17d42b65c51cafb863fb013aR93
In 1.7.4 and earlier LS returns deno:///https/xxx
in 1.7.5 LS returns deno:/https/xxx
Leaves a comment in that issue, but I don't find the stand format in LSP.
Thank you for reporting the issue to deno itself.
I modified the code of "deno" itself and build. https://github.com/denoland/deno/blob/main/cli/lsp/urls.rs#L95
From
format!("deno:/{}", path)
To
format!("deno://{}", path)
two slashes
I was able to jump the definition correctly with "two" slashes
I'm not sure if this is an appropriate fix, but I will continue to watch this issue first. denoland/deno#9514 (comment)
Fixed in coc master release neoclide/coc.nvim#2905
I have confirmed that "jumpDefinition" works fine with both deno v1.7.5 and v1.7.4 versions.