Skip to content

Console pane shows (unknown) for the R version while the session is starting #18857

Closed

Description

@kevinushey

System details

Not specific to a platform or version; applies to both RStudio Desktop and RStudio Server.

Describe the issue

The Console pane's interpreter label (the R logo and version next to the working directory) reads (unknown) while a session is starting, and only switches to the real version some seconds later.

The label is created with the (unknown) placeholder and then fills itself in from the get_rversion_info RPC. At startup that RPC is queued behind whatever R is busy with, so the placeholder is what users see for the first seconds of every session -- longest on RStudio Server, on slow workspace restores, and on projects with heavy startup code.

Suggested improvement

The version is already on the client before the widget is built: client_init sends it as r_versions_info.r_version in session info, from the same module_context::rVersion() the RPC uses, and session info is set before the workbench is constructed.

The label can therefore be seeded from session info synchronously, with the RPC left in place to refresh it (so a restart into a different R version is still picked up). (unknown) then remains only as the fallback for the case where session info isn't available yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions