-
Notifications
You must be signed in to change notification settings - Fork 27
Description
While I was playing around with lifecycle::deprecate_soft() before opening issue #150, I ran into the following:
library(lifecycle)
options(lifecycle_verbosity="warning")
lifecycle::deprecate_soft(when="1.0.0", what="foo()")
# Warning message:
# `foo()` was deprecated in <NA> 1.0.0.
# Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
# generated. All good.
But then:
lifecycle::deprecate_soft(when="1.0.0", what="foo()", with="bar")
# Error in `lifecycle_message()`:
# ! `what` must have function call syntax.
#
# # Good:
# deprecate_soft("bar()")
#
# # Bad:
# deprecate_soft("bar")
# Run `rlang::last_error()` to see where the error occurred.Error should be "! `with` must have function call syntax" instead of "! `what` must have function call syntax".
lifecycle::deprecate_warn() has the same problem.
Best,
H.
Matrix products: default
BLAS: /home/hpages/R/R-4.2.r82318/lib/libRblas.so
LAPACK: /home/hpages/R/R-4.2.r82318/lib/libRlapack.so
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_GB LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] lifecycle_1.0.3
loaded via a namespace (and not attached):
[1] compiler_4.2.0 cli_3.4.1 glue_1.6.2 crayon_1.5.2 rlang_1.0.6
</details>