Description
I'm not certain if this is a usethis issue, or an rlang issue, or neither and I'm just not understanding something.
I'm experimenting with the new use_standalone()
, and I immediately ran into confusion. Here's a ~reprex (it's package-creation-level so not really a fully independent reprex) to see what I'm seeing:
# Create a mostly-empty package, then
use_standalone("r-lib/rlang", "types-check")
devtools::document(".")
devtools::load_all(".")
# Try to use anything that's in the standalone, such as
check_bool()
#> Error in env_get_list(nms = c("format_arg", "format_code"), last = topenv(), :
#> could not find function "env_get_list"
Don't all the rlang functions in there either need to be namespaced or imported? I see that you're using that standalone in usethis, but I also see that you have import(rlang)
in your NAMESPACE, so maybe that's masking this requirement? I also see that the namespacing was removed in rlang to avoid issues, maybe that helped to mask this issue?
To avoid the loop of errors that the namespacing caused in rlang, does the # imports: rlang (>= 1.1.0)
directive need to be taken as "add @import IMPORTPKGNAME
to PKGNAME-package.R"?
If there's a simpler solution that I'm not seeing, please let me know!