REditorSupport / vscode-R

R Extension for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=REditorSupport.r
MIT License
1.07k stars 128 forks source link

Startup error with renv when project is out of sync. #1458

Open adamaltmejd opened 11 months ago

adamaltmejd commented 11 months ago

Languageserver errors when renv is out of sync.

[2023-12-06 10:47:10.203] workspace initialize error:  <callr_timeout_error/callr_error/rlib_error_3_0/rlib_error/error>
Error in `get_result(output = out, options)`:
! callr timed out
[2023-12-06 10:47:10.702] deliver:  ["Response", "Message", "R6"]
[Error - 10:47:10 AM] Client R Language Server: connection to server is erroring.
Header must provide a Content-Length property.
{"- the project is out-of-sync -- use `renv":":status()` for details.\nContent-Length: 871"}

Fixing the sync issues with eg. renv::snapshot() solves the error.

duccioa commented 9 months ago

Pretty much at the same time I filed the issue for the same reason on the languageserver package repository /REditorSupport/languageserver/#645.

I found that you can disable renv status check with renv::config$synchronized.check(FALSE) or using RENV_CONFIG_SYNCHRONIZED_CHECK = FALSE in your .Renviron.