Skip to content

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

@PMassicotte

Description

@PMassicotte

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions