-
-
Notifications
You must be signed in to change notification settings - Fork 27
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
Make sure r-universe is a compatible source for the package cache #163
Comments
Another potentially separate issue, but errors might appear at first when trying to hydrate, but resolve themselves later as packages get installed via restore: https://codimd.carpentries.org/_4KFOwW-R0eYgwkhu6SIdg?view |
Another data point: https://github.com/zkamvar/test-with-renv/runs/3861848594?check_suite_focus=true
I've added {stringi} to The Carpentries r-universe, but here's the problem: {renv} expects all versions of a package to be retrievable from repository archives based on the version number. This unfortunately breaks when you have a package taken from an R-Universe. Why you ask? It's because R-universe is not an archive. When stringi updated from 1.7.4.9000 to 1.7.5, the devel version was lost and renv got confused. Luckily, there may be a solution to this by setting the |
Update: I have attempted to create a solution based on what I thought the option above was doing, but to no avail: over <- function(repo, record) {
if (!grepl('r[-]universe[.]dev.?$', repo)) return(NULL)
vsn <- gsub("[^.0-9]", '', suppressWarnings(readLines(paste0(repo, "/packages/", record$Package))))
vsn <- vsn[vsn != '']
url <- contrib.url(repo, type = "binary")
sfx <- if (grepl("macos", url)) ".tgz" else if (grepl("windows", url)) ".zip" else ".tar.gz"
paste0(url, "/", record$Package, "_", vsn, sfx)
} The issue here is that the option above is indeed looking for an archive link that will have that specific version, so we end up with errors like this:
|
The solution here is to use |
François tried out creating a new repository with {sandpaper} and he ran into an interesting problem: because he installed his {renv} package from https://zkamvar.r-universe.dev, there was a problem he ended creating a lockfile that could not be restored because it contained a repository that was not listed at the top:
https://github.com/fmichonneau/test-renv/blob/991dba347bfd65c3e49f49537b982b92d1cee438/renv/profiles/lesson-requirements/renv.lock
He ended up getting this error:
When he re-installed {renv} from CRAN, it worked:
https://github.com/fmichonneau/test-renv-2/blob/main/renv/profiles/lesson-requirements/renv.lock
The text was updated successfully, but these errors were encountered: