New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Let install_version()
search for version in multiple repos
#1107
Comments
Looking closer at
and the |
Why can't you use use_devel <- function(devel = TRUE) {
repos <- getOption("repos")
if (isTRUE(devel)) {
repos["Dev"] <- "http://myserver/cran-dev"
} else {
repos <- repos[names(repos) != "Dev"]
}
options(repos = repos)
}
|
That doesn't work because dev packages can depend on prod packages. |
'prod' packages would still be available using |
Here's a scenario where that doesn't work:
If I want to install the 'dev' version of In a nutshell, wanting the Your suggestion of tweaking |
Here's my forkbranch where I'm working on this: https://github.com/kenahoo/devtools/commits/install_version-multi |
This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/ |
TL;DR: I would like to change
install_version()
so that it will search for the requested version of the package in each of the repositories given, in sequence.Motivation: my company uses R internally, creating packages for various projects and publishing them to internal CRAN-alike servers for integration by other teams. We have one “cran-stable” for official releases, and one CRAN-alike that updates with new snapshots every time someone pushes to a “develop” branch.
I would like our team to call
install_version(pkg, version, repos)
, which then iterates over each entry ofrepos
until a suitable version is found.For instance, we might have the following:
Right now, it looks like
install_version()
expects exactly one version of a package to be officially published across all repositories, and it only knows how to look for alternate versions inarchive/
directories, under the assumption that the only alternate versions that could exist are previously-published versions.Also, because packages in the “Dev” server may have versioned dependencies on packages from either repository, the same semantics would need to apply to the dependencies too, so
install_version()
would call itself recursively to handle them.I would be happy to work this up as a pull request that keeps the existing semantics of finding packages in
archive/
directories too.The text was updated successfully, but these errors were encountered: