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
I think this might be a regression as this was apparently implemented in #1175
If you installed a package via install.packages(..., repos = "<repo>") then <repo> isn't captured anywhere in the lock file and the lock file is thus not able to be restored.
Code to reproduce:
# Set repo where most recent version of renv is available from, but not too recent so we can install newer packages
options(repos="https://packagemanager.posit.co/cran/2025-02-08")
install.packages("renv")
renv::init() # and then Restart R# Ensure correct url is stored in the initial lock file
options(repos="https://packagemanager.posit.co/cran/2025-02-08")
renv::snapshot()
# data.table v1.17.0 was released on Feb 22, 2025 so won't be availabel in the 8th Feb snapshot used above# May need to adjust environment variables to not link to an already installed/cached version
install.packages("data.table", repos="https://packagemanager.posit.co/cran/2025-03-03" )
# insert a `library(data.table)` somewhere for R env to pick it uprenv::snapshot()
Then if you inspect the lock file:
"Repositories": [
{
"Name": "CRAN",
"URL": "https://packagemanager.posit.co/cran/2025-02-08"
}
]
},
........
"data.table": {
"Package": "data.table",
"Version": "1.17.0",
"Source": "Repository",
"Title": "Extension of `data.frame`",
"Depends": [
"R (>= 3.3.0)"
],
"Imports": [
"methods"
],
"Suggests": [
"bit64 (>= 4.0.0)",
"bit (>= 4.0.4)",
"R.utils",
"xts",
"zoo (>= 1.8-1)",
"yaml",
"knitr",
"markdown"
],
"Description": "Fast aggregation of large data (e.g. 100GB in RAM), fast ordered joins, fast add/modify/delete of columns by group using no copies at all, list columns, friendly and fast character-separated-value read/write. Offers a natural and flexible syntax, for faster development.",
"License": "MPL-2.0 | file LICENSE",
"URL": "https://r-datatable.com, https://Rdatatable.gitlab.io/data.table, https://github.com/Rdatatable/data.table",
"BugReports": "https://github.com/Rdatatable/data.table/issues",
"VignetteBuilder": "knitr",
"Encoding": "UTF-8",
"ByteCompile": "TRUE",
"Authors" : <removed for brevity>
"Authors@R" : <removed for brevity>
"NeedsCompilation": "yes",
"Maintainer": "Tyson Barrett <[email protected]>",
"Repository": "CRAN"
},
Key bit is "Repository" still points to "CRAN" even though the current CRAN url does not contain this version of data.table
The text was updated successfully, but these errors were encountered:
gowerc
changed the title
renv doesn't capture additional repos from install.packages(..., repos = "")
renv doesn't capture additional repos from install.packages(..., repos = "<repo>")Mar 4, 2025
I think this might be a regression as this was apparently implemented in #1175
If you installed a package via
install.packages(..., repos = "<repo>")
then<repo>
isn't captured anywhere in the lock file and the lock file is thus not able to be restored.Code to reproduce:
Then if you inspect the lock file:
Key bit is "Repository" still points to "CRAN" even though the current CRAN url does not contain this version of
data.table
The text was updated successfully, but these errors were encountered: