Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

temporarily use site library to set up VSCode-R ext #102

Merged
merged 3 commits into from
Jun 7, 2024
Merged

Conversation

hturner
Copy link
Member

@hturner hturner commented May 29, 2024

The VSCode-R extension checks for the jsonlite and rlang packages during initialization, so that the R Session Watcher will work. We install these packages when we install languageserver in the release version R that we add to the Docker container.

Although these packages only need to be available to the version of R used for background processes (defined by Rpath: Linux setting), the check is run on the version of R used in interactive sessions (defined by Rterm: Linux setting).

This PR adds an .Rprofile to temporarily add the library where the packages are installed to the library search path.

I have also set the options for the PNG graphics to a more sensible size - this may later be replaced by using httpgd graphics (#100 (comment)).

@hturner
Copy link
Member Author

hturner commented Jun 7, 2024

Updated to use httpgd graphics. This requires the httpgd package to be available to the active R process. So now the .Rprofile adds the site library which has the necessary packages for full capability of the VS-Code extension. This library is separate from the library where the base and recommended packages are installed, so there is no clash. E.g. an R build without the recommended packages will have the base R packages built from the source code in the default library, no recommended packages, plus the add-on packages required for VSCode built for the latest R release in the site library.

Only tools:vscode is attached to the search path, which is similar to the RStudio setup. Vanilla R can always be run by running bin/R from the build directory in a terminal, where plots will be sent to Rplots.pdf.

@hturner hturner merged commit 6b919f6 into devel Jun 7, 2024
@hturner hturner deleted the libPaths branch June 7, 2024 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant