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
{{ message }}
Repository navigation
lockfile_install() reinstalls source packages every time when CRAN is cran.r-universe.dev #486
But source tarballs from r-universe use Repository: https://cran.r-universe.dev in DESCRIPTION, and add_metadata() writes the Remote* fields but doesn't touch Repository, so nothing pak installed from r-universe can pass the check and pkgplan_update() just reinstalls everything on every run.
I asked Claude to come up with this minimal reproducible example (I see the same thing with pak 0.9.2 and 0.11.1.9000):
If repos is set to c(CRAN = "https://cloud.r-project.org") the second call says "kept 1" and Repository is "CRAN".
Would a solution be for the source branch to also accept a package whose RemoteRepos matches the lockfile entry, the way installedok_remote_standard() does for source packages from other repos? pak writes RemoteRepos at install time, so anything pak installed would pass.
I should have mentioned that for our case, it seems like switching that job to pak-version: devel works around the problem because the devel pak gets r-universe's Windows ARM64 binaries (r-lib/pkgcache#142) and binary entries are checked on Built instead of Repository. The dependency step went from 26 minutes to 2 minutes (stan-dev/cmdstanr#1304). Having said that, this still matters for anyone installing source packages from an r-universe mirror.
I am not sure if that's a problem in practice. I believe that most people are using r-universe mirrors exactly for the binary packages.
Yeah, I agree. I guess it could still affect a package that has no binary on r-universe and so falls back to source, in which case it would be rebuilt on every lockfile_install(). But maybe that's not worth a change and this can be closed.
To answer your other question, we're not setting options(repos) ourselves, we just use standard r-lib/actions steps on a windows-11-arm runner:
The R that gets installed there is the community Windows ARM64 build from github.com/r-devel/windows-arm64 (R 4.6.1 in our case, CRAN has no Windows ARM64 installer). That sets CRAN = https://cran.r-universe.dev (explained in the README there). setup-r normally points CRAN at cran.rstudio.com (or I think P3M on x86), but if the R installer already set a mirror, setup-r keeps it unless you also pass the cran input and so on this runner CRAN stays as r-universe. The "Repo status" that setup-r-dependencies prints with pak 0.11.1 is
name url type platform path
CRAN https://cran.r-universe.dev cran source src/contrib
BIOC https://bioc-release.r-universe.dev cranlike source src/contrib
and every lockfile entry is "platform": "source", "repotype": "cran".
Activity
jgabry commentedon Oct 4, 2026
I should have mentioned that for our case, it seems like switching that job to
pak-version: develworks around the problem because the devel pak gets r-universe's Windows ARM64 binaries (r-lib/pkgcache#142) and binary entries are checked onBuiltinstead ofRepository. The dependency step went from 26 minutes to 2 minutes (stan-dev/cmdstanr#1304). Having said that, this still matters for anyone installing source packages from an r-universe mirror.gaborcsardi commentedon Oct 4, 2026
Can you show the code what you run, e.g. how do you set
options(repos)?I am not sure if that's a problem in practice. I believe that most people are using r-universe mirrors exactly for the binary packages.
gaborcsardi commentedon Oct 4, 2026
Here is the code that decides whether such a package should be updated:
pkgdepends/R/type-cran.R
Line 122 in d1a776a
jgabry commentedon Oct 5, 2026
Thanks for the quick response.
Yeah, I agree. I guess it could still affect a package that has no binary on r-universe and so falls back to source, in which case it would be rebuilt on every
lockfile_install(). But maybe that's not worth a change and this can be closed.To answer your other question, we're not setting
options(repos)ourselves, we just use standardr-lib/actionssteps on awindows-11-armrunner:The R that gets installed there is the community Windows ARM64 build from github.com/r-devel/windows-arm64 (R 4.6.1 in our case, CRAN has no Windows ARM64 installer). That sets
CRAN = https://cran.r-universe.dev(explained in the README there).setup-rnormally points CRAN at cran.rstudio.com (or I think P3M on x86), but if the R installer already set a mirror,setup-rkeeps it unless you also pass thecraninput and so on this runner CRAN stays as r-universe. The "Repo status" thatsetup-r-dependenciesprints with pak 0.11.1 isand every lockfile entry is
"platform": "source","repotype": "cran".