We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Despite fixing the following in globals 0.14.0 (Issue #69):
> globals::findGlobals({ f <- function(x) x; x }, substitute = TRUE) [1] "{" "<-" "x"
it fails when wrapped inside other calls:
> globals::findGlobals(local({ f <- function(x) x; x }), substitute = TRUE) [1] "local" "{" "<-" > globals::findGlobals(tryCatch({ f <- function(x) x; x }), substitute = TRUE) [1] "tryCatch" "{" "<-" > globals::findGlobals(lapply(1:2, function(idx) { f <- function(x) x; x }), substitute = TRUE) [1] "lapply" ":" "{" "<-"
Because of this, future map-reduce calls like:
> future::plan("cluster", workers = 1L) > x <- 42 > y <- future.apply::future_lapply(1:2, function(idx) { f <- function(x) x; x }) Error in ...future.FUN(...future.X_jj, ...) : object 'x' not found > y <- furrr::future_map(1:2, function(idx) { f <- function(x) x; x }) Error in ...furrr_fn(...) : object 'x' not found > library(foreach) > doFuture::registerDoFuture() > y <- foreach(idx=1:2) %dopar% { f <- function(x) x; x } Error in { : task 1 failed - "object 'x' not found"
The latter is adapted from futureverse/doFuture#46
The text was updated successfully, but these errors were encountered:
A slightly smaller version of this problem is:
> globals::findGlobals(local({ function(x) x; x }), substitute = TRUE) [1] "local" "{"
We also note that ordering matters:
> globals::findGlobals(local({ x; function(x) x }), substitute = TRUE) [1] "local" "{" "x"
Sorry, something went wrong.
No branches or pull requests
Despite fixing the following in globals 0.14.0 (Issue #69):
it fails when wrapped inside other calls:
Because of this, future map-reduce calls like:
The latter is adapted from futureverse/doFuture#46
The text was updated successfully, but these errors were encountered: