-
Notifications
You must be signed in to change notification settings - Fork 761
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
Use get directly instead of match.fun #936
Conversation
@@ -152,7 +152,9 @@ dev_remote_type <- function(remotes = "") { | |||
} else { | |||
stop("Malformed remote specification '", x, "'", call. = FALSE) | |||
} | |||
tryCatch(fun <- match.fun(paste0("install_", tolower(type))), | |||
tryCatch(fun <- get(x = paste0("install_", tolower(type)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not terribly consistent about enforcing this, but I'd prefer subsequent arguments to be indented just one extra level
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be fixed by 4903b51
Is it desirable to have it search in non-devtools environments? (That's what happens because of the default |
I think you mean that commit uses |
I edited the comment, no one will ever know! |
jimhester@d21c892 should be ready to merge whenever. This will allow use of the |
Use get directly instead of match.fun
Thanks! |
invoke r-lib/devtools#936 magic
This installs all packages from one R session rather than using multiple. It should be slightly faster. I also explicitly attached devtools to avoid r-lib/devtools#936, the fix is not yet on CRAN.
The previous implementation used
match.fun()
, which has the undesirable effect that the function cannot be found if the devtools namespace is not attached.So
devtools::install_deps()
would fail, which is what was happening on travis (https://travis-ci.org/hadley/devtools/builds/81765159#L2108-L2110) when I tried to useRemotes:
This fix uses
get()
directly in thedevtools
namespace, so works regardless if devtools is attached.