::local_options(lifecycle_verbosity = "warning") rlang
Intermittent warnings
I’ve been dealing with debugging a package with a dplyr warning that only appears every 8 hours with the message
8 hours.
This warning is displayed once every `lifecycle::last_lifecycle_warnings()` to see where this warning was generated. Call
It causes warnings every time I test the whole package with devtools::test()
, but only every 8 hours otherwise, which makes tracing and debugging impossible.
{rlang} provides a way to set {lifecycle} warning frequencies (docs) so I set in my test script
I think this should do it too
options(lifecycle_verbosity = "warning")
Sometimes those settings aren’t enough - they tend to work with devtools::test
, but not for interactively running code and trying to use the debugger to find the issue. In those cases, it seems to work to set the verbosity to ‘error’
::local_options(lifecycle_verbosity = "error")
rlang# or
options(lifecycle_verbosity = "error")