Repository navigation
Closed
Labels
Description
The problem could be reproduced with the following steps in VSCode:
- Create a new untitled document
- Choose language R or paste any R code into the editor
- Errors occur as the following:
handling notification: textDocument/didOpen
did open: {
"uri": "untitled:untitled-1",
"version": 2
}
internal error: Error: 'd:untitled-1' does not exist.
Stack trace:
1: stop("'", path, "' does not exist", if (!is_absolute_path(path)) paste0(" in current working directory ('",
getwd(), "')"), ".", call. = FALSE)
2: check_path(path)
3: standardise_path(file)
4: datasource(file, skip = skip, skip_empty_rows = skip_empty_rows)
5: readr::read_lines(path_from_uri(uri))
6: dispatch(self, params)
received: Content-Length: 118
received payload.
handling request: textDocument/documentColor
internal error: Error: key not found
Stack trace:
1: self$documents$get(uri)
2: stop("key not found")
3: self$documents$get(uri)
4: dispatch(self, id, params)
deliver: ["Response", "Response", "Message", "R6"]
[Error - 11:04:15 AM] Request textDocument/colorPresentation failed.
Message: Error: key not found
Stack trace:
1: self$documents$get(uri)
2: stop("key not found")
3: self$documents$get(uri)
4: dispatch(self, id, params)
Code: -32603
received: Content-Length: 117
received payload.
handling request: textDocument/documentLink
internal error: Error: key not found
Stack trace:
1: self$documents$get(uri)
2: stop("key not found")
3: self$documents$get(uri)
4: dispatch(self, id, params)
deliver: ["Response", "Response", "Message", "R6"]
[Error - 11:04:15 AM] Request textDocument/documentLink failed.
Message: Error: key not found
Stack trace:
1: self$documents$get(uri)
2: stop("key not found")
3: self$documents$get(uri)
4: dispatch(self, id, params)
Code: -32603
received: Content-Length: 119
received payload.
handling request: textDocument/documentSymbol
internal error: Error: key not found
Stack trace:
1: self$documents$get(uri)
2: stop("key not found")
3: self$documents$get(uri)
4: dispatch(self, id, params)
deliver: ["Response", "Response", "Message", "R6"]
[Error - 11:04:15 AM] Request textDocument/documentSymbol failed.
Message: Error: key not found
Stack trace:
1: self$documents$get(uri)
2: stop("key not found")
3: self$documents$get(uri)
4: dispatch(self, id, params)
Code: -32603
It seems that the untitled document will get the language from the text being pasted and the uri of the document is untitled:untitled-n.
Activity
[-]Pasting R code in untitled document triggers didOpen[/-][+]Error when editing untitled document in R language[/+]randy3k commentedon Feb 9, 2020
fixed in #198