-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
renv::dependencies()
incomplete dependency discovery for R Notebook
#7935
Comments
This issue seems related to rstudio/renv#481. Also, as a workaround, is there a way to manually add dependencies to |
Where are you seeing that those packages are required? For example:
In other words, |
RStudio is stating that these are required for R Notebooks. The message I get when trying to create a new R Notebook in a new project is:
Which is |
Interesting, is this an RStudio regression? #4628 The dependencies for R Markdown appear to be stored stored here: https://github.com/rstudio/rstudio/blob/master/src/cpp/session/resources/dependencies/r-packages.json |
It appears to be a regression indeed! I'm going to move this to the RStudio repository. |
Thanks! To clarify, the issue appears to be that
|
This was copied from a much older list. Here's the same source in the 1.2 release: @kevinushey is it possible that Rcpp is a platform specific dependency? (i.e. maybe it's only required on Linux where some of these packages have native code?) |
I don't think so. Rather, I believe that Rcpp and rprojroot used to be (recursive) dependencies of the |
These are heavyweight dependencies, so if we don't need them we should definitely axe them. |
Verified fixed on version 1.4.944 |
I'm not sure if this is a bug or a feature request, but
renv::dependencies()
discoversrmarkdown
but notRcpp
orrprojroot
when using RStudio R Notebooks.What I'm trying to do
Create an RStudio project that contains R Notebooks, and store package dependencies using
renv
.Expected behavior
All packages needed for R Notebooks are written to
renv.lock
, including:Rcpp, base64enc, digest, evaluate, glue, highr, htmltools, jsonlite, knitr, magrittr, markdown, mime, rmarkdown, rprojroot, stringi, stringr, tinytex, xfun, yaml
Actual behavior
The following packages are not added to
renv.lock
:backports, Rcpp, rprojroot
How to reproduce
With only system packages installed and
renv
installed in the site library:renv
renv::snapshot()
renv::clean()
will prompt removal ofbackports, Rcpp, rprojroot
Environment
macOS Mojave 10.14.6
RStudio 1.3.1093
R 4.0.2 (homebrew package)
renv 0.12.0
More info
From the FAQ, I know that renv relies on static analysis. In theory, it should be possible to inspect the header of the
.Rmd
file and look for theoutput: html_notebook
identifier. The missing dependencies here are reallyrprojroot
andRcpp
, asbackports
is required byrprojroot
.The text was updated successfully, but these errors were encountered: