rlang icon indicating copy to clipboard operation
rlang copied to clipboard

`import-standalone-defer.R` calls `deferred_run()` but doesn't define it

Open DavisVaughan opened this issue 9 months ago • 0 comments

https://github.com/r-lib/rlang/blob/c55f6027928d3104ed449e591e8a225fcaf55e13/R/import-standalone-defer.R#L87

> rlang::local_options(foo = 1)
Setting global deferred event(s).
i These will be run:
  * Automatically, when the R session ends.
  * On demand, if you call `withr::deferred_run()`.
i Use `withr::deferred_clear()` to clear them without executing.

Restarting R session...

Error in deferred_run(env) : could not find function "deferred_run"

It either needs to prefix with withr:: (which I'm not 100% sure about, given this is a compat file, i.e. if this was in a package would it prompt the package author to put withr in Suggests?), or define deferred_run() inside this compat file.

DavisVaughan avatar Sep 27 '23 13:09 DavisVaughan