rlang
rlang copied to clipboard
Implement `use_compat()`
Used like use_compat("r-lib/rlang", "purrr")
- Doesn't overwrite by default
- Requires
r-lib/rlang
to have amain
branch. This is where we download the source code from. - This is an internal function
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")
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.