rlang icon indicating copy to clipboard operation
rlang copied to clipboard

Implement `use_compat()`

Open DavisVaughan opened this issue 2 years ago • 2 comments

Used like use_compat("r-lib/rlang", "purrr")

  • Doesn't overwrite by default
  • Requires r-lib/rlang to have a main branch. This is where we download the source code from.
  • This is an internal function

DavisVaughan avatar May 11 '22 14:05 DavisVaughan

Decide if https://usethis.r-lib.org/reference/use_github_file.html is good enough instead

usethis::use_github_file("r-lib/rlang", path = "R/compat-purrr.R", save_as = "R/compat-purrr.R")

DavisVaughan avatar May 11 '22 19:05 DavisVaughan

I think we'll still need a wrapper around use_github_file() so that we can build a simple dependency system into it. I'm thinking about something like this:

.compat_deps <- c("compat-rlang.R", "compat-cli.R")

We'd import/update these deps as well recursively.

lionel- avatar May 23 '22 10:05 lionel-