mason-org / mason-org/r-languageserver

languageserver no longer starts in renv projects unless listed in renv.lock

Open
#8 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
R
Stars
10
Forks
3
PR merge metrics
No merged PRs in 30d

Description

Hi,

Since the recent breaking changes in Mason, I've noticed that the R language server (languageserver) no longer starts in projects using renv unless it's explicitly included in the renv.lock file.

`:LspInfo`:

```
[ERROR][2025-05-08 07:16:38] ...p/_transport.lua:36 "rpc" "R" "stderr" "Error in loadNamespace(x) : there is no package called ‘languageserver’\nCalls: loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart\nExecution halted\n"
```

- This issue only occurs in renv projects.
- It works fine in non-renv projects.
- It also works if I manually install languageserver and snapshot it into the renv.lock file.
- Prior to the latest Mason update, this step wasn't necessary — languageserver would run even if it wasn't in the project's lockfile.

Is this expected behavior with the latest changes? If so, is there a recommended way to ensure smoother integration with renv-based projects?

Thanks,
Phil

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

No source file, test, or entry point is named. Start by reproducing the failure in an renv project with a Mason-installed languageserver, then compare it with a non-renv project and one where languageserver is in renv.lock. Done means the expected integration behavior is established and the regression is fixed or clearly documented.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.