-
Notifications
You must be signed in to change notification settings - Fork 26
Speed up deprecate_soft() / deprecate_warn(), actually warn after 8 hours, and interpolate ({arg})
#191
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
Speed up deprecate_soft() / deprecate_warn(), actually warn after 8 hours, and interpolate ({arg})
#191
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,7 +17,6 @@ Depends: | |
| R (>= 3.6) | ||
| Imports: | ||
| cli (>= 3.4.0), | ||
| glue, | ||
| rlang (>= 1.1.0) | ||
| Suggests: | ||
| covr, | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,7 +7,7 @@ | |
| Code | ||
| (expect_condition(signal_stage("superseded", "foo(bar)"))) | ||
| Output | ||
| <lifecycle_stage: foo(arg) is superseded> | ||
| <lifecycle_stage: foo(bar) is superseded> | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We actually had a bug here where |
||
|
|
||
| # signal_stage supports with | ||
|
|
||
|
|
@@ -19,6 +19,6 @@ | |
| Code | ||
| (expect_condition(signal_stage("superseded", "foo(bar=)", "foo(baz=)"))) | ||
| Output | ||
| <lifecycle_stage: foo(arg) is superseded | ||
| <lifecycle_stage: foo(bar) is superseded | ||
| Please use the `baz` argument instead.> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -213,8 +213,9 @@ test_that("needs_warning works as expected", { | |
| env_poke(deprecation_env, "test", Sys.time()) | ||
| expect_false(needs_warning("test")) | ||
|
|
||
| # More than 8 hours | ||
| env_poke(deprecation_env, "test", Sys.time() - 9 * 60 * 60) | ||
| expect_false(needs_warning("test")) | ||
| expect_true(needs_warning("test")) | ||
|
Comment on lines
+216
to
+218
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This incorrect test started "failing" all of a sudden after I started |
||
|
|
||
| env_poke(deprecation_env, "test", "x") | ||
| expect_snapshot_error(needs_warning("test")) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(arg)here should have been({arg})