-
Notifications
You must be signed in to change notification settings - Fork 156
Open
Description
This issue came up in posit-dev/connect-extensions#160. I was able to reproduce it in an R-base docker image:
docker run --rm -it posit/r-base:4.3-jammy bash
Set up the Public Posit Package Manager. Then, create a project directory in your home directory and cd
to it, and start R.
echo 'options(repos = c(CRAN = "https://packagemanager.posit.co/cran/__linux__/jammy/latest"))' >> ~/.Rprofile
cd
mkdir project
cd project
R
I checked to make sure the option had taken.
> getOption("repos")
CRAN
"https://packagemanager.posit.co/cran/__linux__/jammy/latest"
In R, install renv
and initialize a project.
> install.packages("renv")
...
> renv::init()
Restart the R session. Then, install rlang
and create an explicit snapshot of those two packages:
> renv::install("rlang")
...
> renv::snapshot(packages = c("renv", "rlang")
I've pasted in the resulting lockfile below.
Actual behavior: The "Repository"
listed for renv
is "RSPM"
, and rlang
's "Repository"
field says "CRAN"
. The latter is the name we've been using for that repository for the entire time.
Expected behavior: The repository fields should be the same for both packages.
{
"R": {
"Version": "4.3.3",
"Repositories": [
{
"Name": "CRAN",
"URL": "https://packagemanager.posit.co/cran/latest"
}
]
},
"Packages": {
"renv": {
"Package": "renv",
"Version": "1.1.4",
"Source": "Repository",
"Type": "Package",
"Title": "Project Environments",
"Authors@R": "c( person(\"Kevin\", \"Ushey\", role = c(\"aut\", \"cre\"), email = \"[email protected]\", comment = c(ORCID = \"0000-0003-2880-7407\")), person(\"Hadley\", \"Wickham\", role = c(\"aut\"), email = \"[email protected]\", comment = c(ORCID = \"0000-0003-4757-117X\")), person(\"Posit Software, PBC\", role = c(\"cph\", \"fnd\")) )",
"Description": "A dependency management toolkit for R. Using 'renv', you can create and manage project-local R libraries, save the state of these libraries to a 'lockfile', and later restore your library as required. Together, these tools can help make your projects more isolated, portable, and reproducible.",
"License": "MIT + file LICENSE",
"URL": "https://rstudio.github.io/renv/, https://github.com/rstudio/renv",
"BugReports": "https://github.com/rstudio/renv/issues",
"Imports": [
"utils"
],
"Suggests": [
"BiocManager",
"cli",
"compiler",
"covr",
"cpp11",
"devtools",
"gitcreds",
"jsonlite",
"jsonvalidate",
"knitr",
"miniUI",
"modules",
"packrat",
"pak",
"R6",
"remotes",
"reticulate",
"rmarkdown",
"rstudioapi",
"shiny",
"testthat",
"uuid",
"waldo",
"yaml",
"webfakes"
],
"Encoding": "UTF-8",
"RoxygenNote": "7.3.2",
"VignetteBuilder": "knitr",
"Config/Needs/website": "tidyverse/tidytemplate",
"Config/testthat/edition": "3",
"Config/testthat/parallel": "true",
"Config/testthat/start-first": "bioconductor,python,install,restore,snapshot,retrieve,remotes",
"NeedsCompilation": "no",
"Author": "Kevin Ushey [aut, cre] (<https://orcid.org/0000-0003-2880-7407>), Hadley Wickham [aut] (<https://orcid.org/0000-0003-4757-117X>), Posit Software, PBC [cph, fnd]",
"Maintainer": "Kevin Ushey <[email protected]>",
"Repository": "RSPM"
},
"rlang": {
"Package": "rlang",
"Version": "1.1.6",
"Source": "Repository",
"Title": "Functions for Base Types and Core R and 'Tidyverse' Features",
"Description": "A toolbox for working with base types, core R features like the condition system, and core 'Tidyverse' features like tidy evaluation.",
"Authors@R": "c( person(\"Lionel\", \"Henry\", ,\"[email protected]\", c(\"aut\", \"cre\")), person(\"Hadley\", \"Wickham\", ,\"[email protected]\", \"aut\"), person(given = \"mikefc\", email = \"[email protected]\", role = \"cph\", comment = \"Hash implementation based on Mike's xxhashlite\"), person(given = \"Yann\", family = \"Collet\", role = \"cph\", comment = \"Author of the embedded xxHash library\"), person(given = \"Posit, PBC\", role = c(\"cph\", \"fnd\")) )",
"License": "MIT + file LICENSE",
"ByteCompile": "true",
"Biarch": "true",
"Depends": [
"R (>= 3.5.0)"
],
"Imports": [
"utils"
],
"Suggests": [
"cli (>= 3.1.0)",
"covr",
"crayon",
"desc",
"fs",
"glue",
"knitr",
"magrittr",
"methods",
"pillar",
"pkgload",
"rmarkdown",
"stats",
"testthat (>= 3.2.0)",
"tibble",
"usethis",
"vctrs (>= 0.2.3)",
"withr"
],
"Enhances": [
"winch"
],
"Encoding": "UTF-8",
"RoxygenNote": "7.3.2",
"URL": "https://rlang.r-lib.org, https://github.com/r-lib/rlang",
"BugReports": "https://github.com/r-lib/rlang/issues",
"Config/build/compilation-database": "true",
"Config/testthat/edition": "3",
"Config/Needs/website": "dplyr, tidyverse/tidytemplate",
"NeedsCompilation": "yes",
"Author": "Lionel Henry [aut, cre], Hadley Wickham [aut], mikefc [cph] (Hash implementation based on Mike's xxhashlite), Yann Collet [cph] (Author of the embedded xxHash library), Posit, PBC [cph, fnd]",
"Maintainer": "Lionel Henry <[email protected]>",
"Repository": "CRAN"
}
}
}
Metadata
Metadata
Assignees
Labels
No labels