REditorSupport / REditorSupport/languageserver

The R language server exits shortly after launching VSC

Open
#585 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
R
Stars
675
Forks
118
Avg merge
1d 37m
Merged PRs (30d)
11

Description

The R language server exits shortly after launching VSC. Can you advise a workaround?

Here's the context:

  • OS: Windows
  • VSCode Version:
  • Version: 1.73.1 (user setup)
    Commit: 6261075646f055b99068d3688932416f2346dd3b
    Date: 2022-11-09T04:27:29.066Z
    Electron: 19.0.17
    Chromium: 102.0.5005.167
    Node.js: 16.14.2
    V8: 10.2.154.15-electron.0
    OS: Windows_NT x64 10.0.19045
    Sandboxed: No
  • R Version: 4.0.2
  • vscode-R version: 2.6.1
The following is the R Language Server Output

R Language Server (14120) started
.libPaths set to D:/.checkpoint/2021-06-17/lib/x86_64-w64-mingw32/4.0.2, C:/Program Files/Microsoft/R Open/R-4.0.2/library

Warning message:
package 'sys' was built under R version 4.0.5

[2022-11-27 09:36:14.518] Error: Total path length must be less than PATH_MAX: 260
Call: path_tidy(.Call(fs_path_, lapply(args, function(x) enc2utf8(as.character(x))),
ext))
Stack trace:
1: path_tidy(.Call(fs_path_, lapply(args, function(x) enc2utf8(as.character(x))),
ext))
2: path(start, path[!is_abs])
3: path_norm(path(start, path[!is_abs]))
4: fs::path_abs(str_texts, rootPath)
5: document_link_reply(id, uri, self$workspace, document, rootPath)
6: handler(self, item$id, item$params)
7: parse_callback(self, uri, version, result)
8: private$callback(result)
9: task$check()
10: self$parse_task_manager$check_tasks()
11: self$process_events()

[2022-11-27 09:36:14.526] exiting

[Error - 9:36:15 AM] Connection to server got closed. Server will not be restarted.
R Language Server (14120) exited with exit code null

.vscode-r files: init.r and setting.json attached as .txt

init.txt
settings.txt

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the Windows setup with the reported R, VSCode, and vscode-R versions, using the attached init.txt and settings.txt files. Trace the reported failure from document_link_reply through fs::path_abs and the PATH_MAX error. Done means identifying and documenting a reliable workaround or preventing the language server from exiting in this scenario.

Written by the indexing model from the issue text.

Assessment

Tech stack
r, vscode
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.