Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Present tense / past tense mixing #185

Open
damianooldoni opened this issue Jul 25, 2024 · 0 comments
Open

Present tense / past tense mixing #185

damianooldoni opened this issue Jul 25, 2024 · 0 comments

Comments

@damianooldoni
Copy link

Hi 👋

I am really enjoying using lifecycle 👏
I have just found an "inconsistency" in the warnings returned:

  • past tense for deprecated function: "[..] was deprecated in [..]"
  • present tense for deprecated argument: "[..] is deprecated as of [..]"

Shouldn't be always the same tense?

See reprex, where lifecycle 1.0.4 and R 4.4.1 has been used (Windows OS). Thanks in advance.

library(lifecycle)
a <- function(x) {
  lifecycle::deprecate_warn(when = "1.0.0",
                            what = "a()",
                            with = "b()",
                            always = TRUE
  )
  lifecycle::deprecate_warn(
    when = "1.0.0",
    what = "a(x)",
    with = "b(y)",
    always = TRUE
  )
}

# Run the function - returns the warnings
a(x = 1)
#> Warning: `a()` was deprecated in <NA> 1.0.0.
#> ℹ Please use `b()` instead.
#> Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
#> generated.
#> Warning: The `x` argument of `a()` is deprecated as of <NA> 1.0.0.
#> ℹ Please use the `y` argument of `b()` instead.
#> Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
#> generated.

Created on 2024-07-25 with reprex v2.1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant