8000 namespace vs standalone · Issue #1853 · r-lib/usethis · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
namespace vs standalone #1853
Closed
Closed
@jonthegeek

Description

@jonthegeek

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0