remotes icon indicating copy to clipboard operation
remotes copied to clipboard

Is there a remote type for CRAN-like repositories?

Open klmr opened this issue 2 years ago • 4 comments

I’m referring to the DESCRIPTION Remotes field dependency types. I can see remote types for Git, URL, local, etc. But nothing for a non-CRAN, CRAN-like repository, such as R-Universe (or hosted, private instances of package repositories). Does something like this exist?

I know that I can get the same functionality by instead using a project-level .Rprofile file in the relevant package project, and adding options(repos = c(getOption('repos'), my_repo = "url_here")). But I quite like the declarative style of having this in the package DESCRIPTION instead.

I’m imagining something like the following:

Remotes:
    repo::https://foo.r-universe.dev:pkg1,
    repo::https://private.corporate.ns:pkg2

klmr avatar Dec 02 '22 08:12 klmr

There isn't, and it is unlikely that we'll add it to remotes, as we are rather focusing on improving pak.

gaborcsardi avatar Dec 02 '22 09:12 gaborcsardi

we are rather focusing on improving pak

I fully support this! Should I re-raise the issue for ‘pak’ or ‘pkgdepends’ then?

That said, as far as I understand there are still several other packages (e.g. ‘devtools’, ‘renv’ …?) that either rely on ‘remotes’ or explicit reference it to install packages based on the DESCRIPTION Remotes declaration. Are there plans to port these to use ‘pak’/‘pkgdepends’ in the future? And will ‘pak’ depend on ‘pkgdepends’?

klmr avatar Dec 02 '22 10:12 klmr

devtools will depend on pak eventually.

renv does not use remotes.

pak already contains on pkgdepends.

gaborcsardi avatar Dec 02 '22 11:12 gaborcsardi

renv does not use remotes.

No, but its implementation (linked above) explicitly references the ’remotes’ documentation for the Remotes field. I’m just wondering whether ‘renv’ will continue to have its own implementation of remotes parsing (and, if so, which specification it will in the future reference) or whether it will depend on/vendor ‘pak’ or ‘pkgdepends’. Having this (fairly complex) specification implemented independently (and unavoidably ultimately inconsistently!) in different packages doesn’t strike me as ideal.

klmr avatar Dec 02 '22 13:12 klmr