Open hadley opened 10 months ago
It looks like deprecate_warn0()
gets called twice, the second time with call stack
▆
1. └─rmarkdown::render("vignettes/test.Rmd")
2. └─knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
3. └─knitr:::process_file(text, output)
4. ├─knitr:::handle_error(...)
5. │ └─base::withCallingHandlers(...)
6. ├─base::withCallingHandlers(...)
7. ├─knitr:::process_group(group)
8. └─knitr:::process_group.block(group)
9. └─knitr:::call_block(x)
10. └─knitr:::block_exec(params)
11. └─knitr:::eng_r(options)
12. ├─base::unlist(sew(res, options))
13. ├─knitr::sew(res, options)
14. └─knitr:::sew.list(res, options)
15. └─base::lapply(x, sew, options, ...)
16. ├─knitr (local) FUN(X[[i]], ...)
17. ├─rlang (local) sew.rlang_warning(X[[i]], ...)
18. ├─base::NextMethod()
19. └─knitr:::sew.warning(X[[i]], ...)
20. ├─knitr:::msg_wrap(...)
21. │ └─base::grep("\n", message)
22. │ └─base::is.factor(x)
23. ├─base::sprintf("Warning%s: %s", call, conditionMessage(x))
24. ├─base::conditionMessage(x)
25. └─rlang:::conditionMessage.rlang_warning(x)
26. └─rlang::cnd_message(c)
27. └─rlang:::cnd_message_format(cnd, ...)
28. └─rlang:::cnd_message_lines(cnd, ...)
29. └─rlang::cnd_footer(cnd, ...)
30. └─rlang:::exec_cnd_method("footer", cnd, ...)
31. └─lifecycle (local) method(cnd, ...)
Oh because footer()
is generated lazily so it gets recomputed by knitr::sew()
which is run in an interactive context.
This is super confusing but doesn't affect the rendered site, just the local previews.
Like:
I tried explicitly disabling with:
But that didn't do anything. But I don't understand why
is_interactive()
would be true in the first place?