Present tense / past tense mixing

Open
#185 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
r
Domain
tooling

Research direction

Start by running the provided reprex with lifecycle::deprecate_warn() and compare the two warning messages. Trace the implementation behind that entry point, then make the tense consistent and verify that both function and argument deprecation warnings use the agreed wording.

Written by the indexing model from the issue text.

Description

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

Dominant language
R
Stars
93
Forks
26
Avg merge
4h 7m
Merged PRs (30d)
1

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from r-lib/lifecycle

All issues in r-lib/lifecycle

Similar issues

More R issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.