Skip to content
New issue

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

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

Already on GitHub? # to your account

renv::restore() should have option to add package to library as packages are checked rather than at the end #818

Closed
McKayMDavis opened this issue Aug 16, 2021 · 4 comments

Comments

@McKayMDavis
Copy link

If restore() fails for whatever reason during package version check and download, the process must be rerun from the beginning (hitting the URL for every package again). It would be nice if restore() could check, download and install packages into the library one at a time so that if the process fails somewhere down the line, it can be rerun without needing to hit the URLs to check every package again.

Hopefully that makes sense (and I'm not ignorantly misunderstanding something obvious to the rest of you).

@kevinushey
Copy link
Collaborator

I think you can achieve what you want by setting options(renv.config.install.transactional = FALSE) -- see https://rstudio.github.io/renv/reference/config.html for more details.

@McKayMDavis
Copy link
Author

McKayMDavis commented Aug 17, 2021

I think you can achieve what you want by setting options(renv.config.install.transactional = FALSE) -- see https://rstudio.github.io/renv/reference/config.html for more details.

Do you know if this works differently if using clean = TRUE in restore()? I have tried setting this option and restore(clean = TRUE) appears to be doing the same thing.

EDIT: It looks like this option applies more to installation time of packages than it does to the download time. From how I understand it, renv first downloads all the packages, then installs them. If this option is set to true, during install they will be installed to a temp directory, then to the library if all installs were successful. Conversely, if this option is set to false, the packages will be installed directly to the library at install time.

What I'm hoping to accomplish is for renv to download a package, then install it to the library, then proceed to the next package.

@kevinushey
Copy link
Collaborator

Ah, I see what you mean. Unfortunately no, there isn't a way to do this right now.

@hadley
Copy link
Member

hadley commented Apr 27, 2023

Now tracking in #1109

@hadley hadley closed this as completed Apr 27, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants