-
Notifications
You must be signed in to change notification settings - Fork 92
Closed
Milestone
Description
Adopted from #787 (comment):
Argument conditions does not apply to packages attached via the packages argument, e.g.
library(future)
f <- future(42, packages = "mclust", conditions = structure("condition", exclude = "packageStartupMessage"))
v <- value(f)
print(v)This outputs:
__ __
____ ___ _____/ /_ _______/ /_
/ __ `__ \/ ___/ / / / / ___/ __/
/ / / / / / /__/ / /_/ (__ ) /_
/_/ /_/ /_/\___/_/\__,_/____/\__/ version 6.1.1
Type 'citation("mclust")' for citing this R package in publications.
[1] 42
In constrast, conditions applies during the evaluation of the future expression, i.e.
library(future)
f <- future({
mclust::map ## loads 'mclust'
library(mclust) ## just to prove it works when package is attached too
42
}, conditions = structure("condition", exclude = "packageStartupMessage"))
v <- value(f)
print(v)This only outputs:
[1] 42
The solution is to make sure that conditions are also handled during the startup phase of the evaluation of the future.
UPDATE +30 mins: Added library(mclust) just to clarify that it also works when the package is attached.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels