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

Overriding footer() #187

Open
chainsawriot opened this issue Aug 29, 2024 · 1 comment
Open

Overriding footer() #187

chainsawriot opened this issue Aug 29, 2024 · 1 comment

Comments

@chainsawriot
Copy link

Thank you very much for the package. I was wondering is there a way to skip the footer() call here

wrn <- new_deprecated_warning(msg, trace, footer = footer)

I was asking because the warning generated would encourage the user to report any deprecation warning ("the issue") as GitHub issue, e.g.

The trust argument of import() should be explicit for serialization formats as of rio 1.0.3.
ℹ Missing trust will be set to FALSE by default for RDS in 2.0.0.
ℹ The deprecated feature was likely used in the rio package.
Please report the issue at https://github.com/gesistsa/rio/issues.
@olivroy
Copy link

olivroy commented Sep 20, 2024

I think there is no bug in lifecycle. Take a look at the env, user_env arguments. If the function is called directly, you will not see a deprecation warning

Pair of environments that define where deprecate_*() was called (used to determine the package name) and where the function called the deprecating function was called (used to determine if deprecate_soft() should message).

These are only needed if you're calling deprecate_*() from an internal helper, in which case you should forward env = caller_env() and user_env = caller_env(2).

Otherwise, lifecycle detects that a package internally uses a deprecated feature and hence throws a warning that encourages a bug report

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

2 participants