r-lib / rlang

Low-level API for programming with R
https://rlang.r-lib.org
Other
502 stars 139 forks source link

standalone checks without @import rlang #1698

Closed JosiahParry closed 6 months ago

JosiahParry commented 6 months ago

I'd like to utilize many of the type checks that are available in standalone-types-check that are not available in vctrs or rlang. However, taking advantage of this seems to require including import(rlang) in the NAMESPACE. I'd like to avoid the wholesale importing of rlang.

Is there a future where rlang functions are called via namespace in the standalone scripts?

lionel- commented 6 months ago

We tried that but had to backtrack, IIRC because rlang uses these functions on-load and the namespace isn't populated at that point, which causes :: to fail. The planned future is to have these functions exported from somewhere though.

JosiahParry commented 6 months ago

Thanks @lionel-! For now, I've gone ahead and added the rlang:: namespace call manually. I'll close this and try and keep my eyes out for a new package or something :)