Skip to content

Commit

Permalink
Merge branch 'feature/evalFuture' of github.com:HenrikBengtsson/futur…
Browse files Browse the repository at this point in the history
…e into feature/evalFuture
  • Loading branch information
HenrikBengtsson committed Jan 3, 2025
2 parents ea9fa69 + 7bdb606 commit 858dda6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion R/expressions.R
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,12 @@ evalFuture <- function(
## -----------------------------------------------------------------
## Evaluate expression in a local() environment?
if (local) {
tmpl_expr_local <- bquote_compile(base::local(.(expr)))
tmpl_expr_local <- bquote_compile(base::local({
env <- base::environment()
base::attr(env, "name") <- "future:evalenv"
base::rm(list = "env")
.(expr)
}))
expr <- bquote_apply(tmpl_expr_local)
## WORKAROUND: This makes assumption about withCallingHandlers()
## and local(). In case this changes, provide internal options to
Expand Down

0 comments on commit 858dda6

Please sign in to comment.