Skip to content

Commit

Permalink
Add caveat
Browse files Browse the repository at this point in the history
  • Loading branch information
krlmlr committed Sep 24, 2022
1 parent ea51441 commit e9db4f4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions R/compat-lifecycle.R
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ foreign_caller_env <- function(my_env = ns_env()) {
caller
}

# DO NOT DO THIS!
# This avoids having to pass the environment of the top-level functions
# to error helpers.
# This is bad practice and should be changed to pass caller envs directly.
# See https://github.com/tidyverse/tibble/pull/1379#issuecomment-1236671090
# for context.
my_caller_env <- function(my_env = ns_env()) {
for (n in 2:10) {
caller <- caller_env(n)
Expand Down

0 comments on commit e9db4f4

Please sign in to comment.