-
Notifications
You must be signed in to change notification settings - Fork 152
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::restore always seems to download from GitHub, but will find 'file up to date' for CRAN/P3m #1882
Comments
Can you share the lockfile? Are those packages available in public repositories? |
I am using this one from a git repo (we fetch the file from the remo into local filesystem and then use Admittedly it's not a nice minimum test case since there's a lot of references in it, but, it does show you what we're working with. All packages are available in public repos. We're an Open Science organization that makes our packages public. Edit: |
Thanks! I mainly ask because it's very helpful to have a reproducible example I can run locally; this will help me ascertain whether this is a bug in |
I don't know enough about the internals of the CRAN/P3M vs Github, but GitHub doesn't have a tar file wheras maybe CRAN/P3M does so the file it is saying is 'up to date' is the downloaded TAR vs. it needs to rebuild the TAR when it pulls the github source. If that is the case, would be nice if it could store something about the hash commit that it's fetching and use that as a 'checksum' as to whether the 'file is up to date' vs downloading + rebuild TAR each time. |
A minimum test case for you might be take that lock file, remove a bunch of entries leaving an assortment of CRAN, P3M and GitHub sources to just see how if you restore multiple times from the lock file you should see CRAN/P3M doesn't fetch again, while GitHub does the download. |
I suspect the issue here arises because your lockfile entries don't record the associated GitHub commit for the dependent packages; e.g.
Normally, we'd expect a
Are you generating the lockfile with |
I'm not familiar with how it's constructed, but I'm pretty sure it's curated in some way to remove certain package which make renv:;restore challenging (for example, changing rlang between one version and another seems to sometimes run into issues). But, why they would remove the RemoteSha and Hash fields, I am not sure. I can check with the maintainers of those lock files and ask. Thanks for the insight! |
I'm doing a few restores of a lockfile I'm experimenting with and I'd expect that in prior restores, it would be able to find that a download from GitHub is up to date since it's fetching the same versions of pacakges, however, I get output like this:
Any reason why CRAN and P3M would say files are up date, but every time I run it wants to re-download from GitHub. I'd expect that it would just find that files are up to date just like Cran/P3M does....
The text was updated successfully, but these errors were encountered: