Skip to content

install_github() and friends should use ellipsis::check_dots_used() #2016

Description

@hadley

From @jennybc:

devtools::install_github() used to have a build_vignettes argument. But its current incarnation, now remotes::install_github(), does not have this argument. To build vignettes, we're supposed to do this:

devtools::install_github("foo/bar", build_opts = c("--no-resave-data", "--no-manual"))

as per #1896 (comment).

However lots of people still try to do install_github("foo/bar", build_vignettes = TRUE) and, no doubt, some of our own material probably shows this, i.e. hasn't been updated yet.

And because the signature of install_github() contains ..., their attempts just silently fail:

install_github(repo, ref = "master", subdir = NULL,
  auth_token = github_pat(), host = "api.github.com",
  dependencies = NA, upgrade = c("default", "ask", "always", "never"),
  force = FALSE, quiet = FALSE, build = TRUE,
  build_opts = c("--no-resave-data", "--no-manual",
  "--no-build-vignettes"), repos = getOption("repos"),
  type = getOption("pkgType"), ...)

install_github() needs to give a clear message if you've misspecified the argument names.

(I think this needs to wait until after I've added an option to check_dots_used() to throw a warning instead of an error; since install_github() is called primarily for its side-effects, I think throwing an error is confusing, since it would occur after the side-effects have taken place)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions