-
Notifications
You must be signed in to change notification settings - Fork 92
Open
Milestone
Description
I know there is the "transparent" plan, but I'm still not very helpful tracebacks:
library(future)
plan("transparent")
f = function(x) if (x > 5) stop("whoops") else x
g = function(x) f(x)
result %<-% g(10)
> Error in f(x) : whoops> traceback()
17: stop(condition)
16: resignalCondition(future)
15: signalEarly(x, ...)
14: resolved.Future(future)
13: NextMethod()
12: resolved.UniprocessFuture(future)
11: resolved(future)
10: signalEarly(future, collect = FALSE)
9: run.UniprocessFuture(future)
8: run(future)
7: sequential(expr, envir = envir, substitute = FALSE, lazy = lazy,
seed = seed, globals = globals, local = local, earlySignal = earlySig
nal,
label = label, ...)
6: evaluator(expr, envir = envir, substitute = FALSE, lazy = lazy,
seed = seed, globals = globals, packages = packages, ...)
5: (function (expr, envir = parent.frame(), substitute = TRUE, globals = TRU
E,
packages = NULL, lazy = FALSE, seed = NULL, evaluator = plan("next"),
...)
{
if (substitute)
expr <- substitute(expr)
if (!is.function(evaluator)) {
stop("Argument 'evaluator' must be a function: ", typeof(evaluato
r))
}
future <- evaluator(expr, envir = envir, substitute = FALSE,
lazy = lazy, seed = seed, globals = globals, packages = packages,
...)
if (!inherits(future, "Future")) {
stop("Argument 'evaluator' specifies a function that does not ret
urn a Future object: ",
paste(sQuote(class(future)), collapse = ", "))
}
future
})(g(10), envir = <environment>, lazy = FALSE, seed = NULL, globals = TRU
E)
4: do.call(future::future, args = future.args, envir = assign.env)
3: futureAssign(name, expr, envir = envir, assign.env = assign.env,
substitute = FALSE)
2: futureAssignInternal(target, expr, envir = envir, substitute = FALSE)
1: result %<-% g(10)
-> I just get the top level call, nothing about f().
- Would it be possible to create a plan which just calls base R functions? E.g.,
futureCallcallsdo.call,futureAssigncallsassign,future_lapplycallslapply...? - Alternatively, would it be possible to store and query the traceback?
- Maybe there could also be a plan for the
evaluatepackage?
Metadata
Metadata
Assignees
Labels
No labels