Closed DanChaltiel closed 1 year ago
Hi,
It seems that the very useful global_entrace() forbid the use of other handlers in some contexts.
global_entrace()
callr::r(\(){ library(tidyverse) |> suppressPackageStartupMessages() }) #> [1] "lubridate" "forcats" "stringr" "dplyr" "purrr" "readr" #> [7] "tidyr" "tibble" "ggplot2" "tidyverse" "stats" "graphics" #> [13] "grDevices" "utils" "datasets" "methods" "base" callr::r(\(){ rlang::global_entrace() library(tidyverse) |> suppressPackageStartupMessages() }) #> Error: ! in callr subprocess. #> Caused by error in `globalCallingHandlers(error = function (cnd) ...`: #> ! should not be called with handlers on the stack
Created on 2023-07-28 with reprex v2.0.2
However, this reprex is not 100% reproducible in the console (i.e outside callr), so here is a step list to reproduce the error:
callr
rlang::global_entrace() library(tidyverse)
source("init.R") |> suppressPackageStartupMessages()
This is actually the steps that got me the error. I'm using rlang v1.1.0 with R 4.1.3.
rlang
Unfortunately this is a limitation of base::globalCallingHandlers() that rlang can't work around.
base::globalCallingHandlers()
Hi,
It seems that the very useful
global_entrace()
forbid the use of other handlers in some contexts.Created on 2023-07-28 with reprex v2.0.2
However, this reprex is not 100% reproducible in the console (i.e outside
callr
), so here is a step list to reproduce the error:source("init.R") |> suppressPackageStartupMessages()
This is actually the steps that got me the error. I'm using
rlang
v1.1.0 with R 4.1.3.