Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Is it possible to create hooks in packrat?

29 views
Skip to first unread message

Leonid Sklyut

unread,
Jun 11, 2020, 11:18:50 AM6/11/20
to packrat-discuss
Here's what I'd like to accomplish:

Once I install a package locally, I'd like to push the built binaries to Artifactory, so that the next user in my org does not have to also build the source code. Packrat takes forever to download and build the source for our dependencies, and I'd like to push the built binaries to our artifactory CRAN mirror so that my colleagues don't have to build the same deps. Here's the documentation I'm looking at for pushing the built packages: https://www.jfrog.com/confluence/display/JFROG/CRAN+Repositories 

The fact that packrat::restore() can take 20-30 minutes is a major limiting factor for adoption at my company, so I'm looking for ways to resolve it. I'm open to other suggestions as well. I tried using renv but it seems like it's not much faster, because it also builds the source.

Kevin Ushey

unread,
Jun 11, 2020, 2:31:40 PM6/11/20
to Leonid Sklyut, packrat-discuss
If you're using renv, then you should be able to make use of the global package cache to ensure that packages only ever need to be built the first time they're installed -- subsequent attempts to restore should then install the package from the global cache. Please see the documentation on caching here:


That said, this doesn't fill in the space for automatically pushing and building packages on Artifactory. This should be possible, but unfortunately neither renv nor Packrat provide the tooling necessary to streamline this process. However, if you point Packrat / renv at your Artifactory repository by setting the repos option as appropriate, Packrat and renv should download binaries if they be available.

Best,
Kevin

--
You received this message because you are subscribed to the Google Groups "packrat-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to packrat-discu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packrat-discuss/e6fa6b05-3ce0-4b77-828e-fd308c31a2d9o%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages