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

Null workspace folder not working with untitled documents #460

Closed
renkun-ken opened this issue Jul 24, 2021 · 0 comments · Fixed by #461
Closed

Null workspace folder not working with untitled documents #460

renkun-ken opened this issue Jul 24, 2021 · 0 comments · Fixed by #461

Comments

@renkun-ken
Copy link
Member

Create an untitled document which has uri untitled:Untitled-1 in a null workspace folder (e.g. not opening a folder in , vscode), then root-path related providers will crash the language server.

[2021-07-24 10:56:33.164] parse_callback called: {
  "uri": "untitled:Untitled-1",
  "version": 13
}

[2021-07-24 10:56:33.165] deliver:  ["Response", "Message", "R6"]

[2021-07-24 10:56:33.166] deliver:  ["Response", "Message", "R6"]

[2021-07-24 10:56:33.166] deliver:  ["Response", "Message", "R6"]

[2021-07-24 10:56:33.167] deliver:  ["Response", "Message", "R6"]

[2021-07-24 10:56:33.167] deliver:  ["Response", "Message", "R6"]

[2021-07-24 10:56:33.168] Error: argument is of length zero
Call: if (!is_absolute_path(start)) {
    start <- path_norm(path(getwd(), start))
}
Stack trace:
1: fs::path_abs(source_file, self$rootPath)
2: parse_callback(self, uri, version, result)
3: private$callback(result)
4: task$check()
5: self$parse_task_manager$check_tasks()
6: self$process_events()

[2021-07-24 10:56:33.169] exiting

[Error - 10:56:33 AM] Connection to server got closed. Server will not be restarted.
[Error - 10:56:33 AM] Request textDocument/documentLink failed.
Error: Connection got disposed.
    at Object.dispose (/Users/ken/.vscode-insiders/extensions/ikuyadeu.r-2.1.0/dist/extension.js:2:1447696)
    at Object.dispose (/Users/ken/.vscode-insiders/extensions/ikuyadeu.r-2.1.0/dist/extension.js:2:1527935)
    at b.handleConnectionClosed (/Users/ken/.vscode-insiders/extensions/ikuyadeu.r-2.1.0/dist/extension.js:2:1528148)
    at b.handleConnectionClosed (/Users/ken/.vscode-insiders/extensions/ikuyadeu.r-2.1.0/dist/extension.js:2:1588679)
    at t (/Users/ken/.vscode-insiders/extensions/ikuyadeu.r-2.1.0/dist/extension.js:2:1526237)
    at invoke (/Users/ken/.vscode-insiders/extensions/ikuyadeu.r-2.1.0/dist/extension.js:2:1449313)
    at a.fire (/Users/ken/.vscode-insiders/extensions/ikuyadeu.r-2.1.0/dist/extension.js:2:1450074)
    at X (/Users/ken/.vscode-insiders/extensions/ikuyadeu.r-2.1.0/dist/extension.js:2:1436954)
    at invoke (/Users/ken/.vscode-insiders/extensions/ikuyadeu.r-2.1.0/dist/extension.js:2:1449313)
    at a.fire (/Users/ken/.vscode-insiders/extensions/ikuyadeu.r-2.1.0/dist/extension.js:2:1450074)
    at h.fireClose (/Users/ken/.vscode-insiders/extensions/ikuyadeu.r-2.1.0/dist/extension.js:2:1461542)
    at Socket.<anonymous> (/Users/ken/.vscode-insiders/extensions/ikuyadeu.r-2.1.0/dist/extension.js:2:1462327)
    at Socket.emit (events.js:327:22)
    at TCP.<anonymous> (net.js:673:12)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant