Open tzakharko opened 2 years ago
Not sure why the pipeline is failing, there are some references to invalid GitHub credentials etc... all tests pass on my local machine (macOS 12.1 with R 4.1)
@gaborcsardi Did you by any chance have the time to look at the patch and see whether this approach is in principle sufficient?
I am sorry for the long wait. I am working on pkgdepends again, and will look at this soon.
This is a proof of concept implementation for #261
The basic idea is to leverage the fact that the metadata of installed packages is already cached. So we don't need to do much — just inject some metadata describing the contents of the local repository (in this initial draft it's the local path + the file checksums) and do nothing if they match the already installed package. Seems to work well enough in local tests, but I cannot exclude that I missed something crucial — the package logic is fairly complex and I barely scraped the surface of the iceberg in trying to understand it.
The checksumming currently relies on
tools::md5sum()
and simply concatenates the hash for all files (just to show that it works), but we probably want to usedigest
here for proper sha256 (this would mean hard dependency ondigest
however). Otherwise we need to find a way to mix the md5 hashes somehow without introducing new package dependencies. Regarding performance: checksumming does introduce some overhead, but making a package is still much much slower, so if you local packages do not change too often, amortized savings over time can be substantial.Please tell me what you think and I'll do my best to transition it to something more production ready.