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

Update remotes #1067

Merged
merged 26 commits into from Apr 25, 2016

Conversation

Projects
None yet
4 participants
@jimhester
Member

jimhester commented Feb 3, 2016

Implementation of update_remotes as defined in #1037, #975.

I also improved the SVN support to include the SVN revision, so this will now work with all remotes in devtools.

I still need to add tests for this, but this works with a simple test on all remote types on my machine.

remotes <- compact(lapply(pkgs, package2remote))
if (!isTRUE(force)) {

This comment has been minimized.

@hadley

hadley Feb 5, 2016

Member

Is there are reason to do this here, rather than relying on the individual install methods?

@jimhester

This comment has been minimized.

Member

jimhester commented Feb 5, 2016

jimhester@ed000dd does as you suggest moving the SHA checking into install_remote() so it works the same across all remote types.

I also moved the remote updating into update.package_deps, so it will automatically work with the existing update_packages().

package2remote <- function(x, ...) {
x <- packageDescription(x)
if (is.null(x$RemoteType)) {
return(NULL)

This comment has been minimized.

@hadley

hadley Feb 5, 2016

Member

What do you think about having a CRAN package type here? That might make it easy for update_packages() to work with everything

This comment has been minimized.

@jimhester

jimhester Feb 5, 2016

Member

This has been done at jimhester@8bdb10b, let me know your thoughts...

#' install_CRAN("ggplot2")
#' install_CRAN(c("httpuv", "shiny")
#' }
install_CRAN <- function(pkgs, repos = getOption("repos"), type = getOption("pkgType"), ..., quiet = FALSE) {

This comment has been minimized.

@hadley

hadley Feb 8, 2016

Member

I'd prefer all lowercase to be consistent

This comment has been minimized.

@jimhester
#' @export
remote_download.CRAN_remote <- function(x, quiet = FALSE) {
dest_dir <- tempdir()
download.packages(x$name, destdir = dest_dir, repos = x$repos, type = x$pkg_type)[1, 2]

This comment has been minimized.

@hadley

hadley Feb 8, 2016

Member

I forget how this works, but are we already computing the dependencies that are missing/out-of-date?

This comment has been minimized.

@jimhester

jimhester Feb 8, 2016

Member

Dependencies are all done in install() itself which calls install_deps() so we don't have to worry about it here.

@krlmlr

This comment has been minimized.

Member

krlmlr commented Feb 11, 2016

While you're at it: Is there a way to not install/upgrade remotes, just to install a single package? I tried

devtools::install("path", dependencies = FALSE, upgrade_dependencies = FALSE, metadata = NULL)

to no avail. (Now I know that the "metadata" arg does something different, never mind.) To me, it looks like install_dev_remotes() is called unconditionally. For now, I'll be using RCMD("INSTALL") as workaround.

@jimhester

This comment has been minimized.

Member

jimhester commented Feb 11, 2016

@krlmlr You are correct, the remotes should respect update_dependencies as well.

@jimhester

This comment has been minimized.

Member

jimhester commented Apr 6, 2016

c35630c has a simple implementation to handle #1109

@krlmlr krlmlr referenced this pull request Apr 9, 2016

Closed

couldn't install hms #11

@codecov-io

This comment has been minimized.

codecov-io commented Apr 25, 2016

Current coverage is 42.33%

Merging #1067 into master will decrease coverage by -0.65%

@@           master   #1067   diff @@
=====================================
  Files          85      86     +1   
  Lines        4310    4429   +119   
  Methods         0       0          
  Branches        0       0          
=====================================
+ Hits         1853    1875    +22   
- Misses       2457    2554    +97   
  Partials        0       0          
  1. 5 files (not in diff) in R were modified. more
    • Misses -48
    • Hits +14
  2. File R/install-remote.R was modified. more
    • Misses -1
    • Partials 0
    • Hits +1

Sunburst

Powered by Codecov. Last updated by 40eafb1

Add note to NEWS
[ci skip]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment