You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems like maybe the repos argument isn't getting passed to pak correctly or something? renv::restore() seems to fail when the lockfile contains R packages installed from r-universe.
To reproduce:
Create a new RStudio project
install azmetr from r-universe with install.packages("azmetr", repos = c("https://cct-datascience.r-universe.dev", "https://cloud.r-project.org"))
Thanks for the bug report -- unfortunately, pak doesn't support installation of specific packages from specific repositories (at least, in a single call). We could probably collect all of the known repositories and provide those when using pak to install / restore packages, but that feels somewhat brittle.
What if azmetr depends on a package that was installed from another repository as well? Or, what if you had multiple repositories providing the same package, but you needed renv to prefer one of those over the other? That's my main worry.
It's probably not a concern in this case, since there's only a single r-universe package, but I think it could be a problem if you had multiple different r-universe repositories in use, or if there was overlap between the packages provided by the repositories.
It seems like maybe the
repos
argument isn't getting passed topak
correctly or something?renv::restore()
seems to fail when the lockfile contains R packages installed from r-universe.To reproduce:
azmetr
from r-universe withinstall.packages("azmetr", repos = c("https://cct-datascience.r-universe.dev", "https://cloud.r-project.org"))
library(azmetr)
in itrenv::init()
+renv::snapshot()
options(renv.config.pak.enabled = TRUE)
renv::restore()
Resulting error message:
sessionInfo()
R version 4.4.1 (2024-06-14)
Platform: x86_64-apple-darwin20
Running under: macOS 15.3.1
Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.4-x86_64/Resources/lib/libRlapack.dylib; LAPACK version 3.12.0
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
time zone: America/Phoenix
tzcode source: internal
attached base packages:
[1] stats graphics grDevices datasets utils methods base
loaded via a namespace (and not attached):
[1] compiler_4.4.1 tools_4.4.1 renv_1.1.1 pak_0.8.0
The text was updated successfully, but these errors were encountered: