suppressPackageStartupMessages in a future #802
-
|
I'm wondering how I can suppress package startup messages when the dependencies are collected by {future}. This "issue" came up in the context of a shiny app (messages started to show up a few month ago, this problem did not exist previously) - please find a reproducible example below. Once the actionButton is pressed and the task is first invoked in a fresh R session messages from library(bit64) are displayed.
This is not the case once I explicitly specify the namespace of the function ( However, in my actual code I'm not using a bit64 function directly it is called by {data.table} so I don't have control regarding this. PS: a similar discussion can be found here: However, the fix doesn't (or no longer) seem to work in my case. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
|
Hi, here's a minimal reproducible example of the problem: library(future)
plan(multisession)
suppressPackageStartupMessages({
library(bit64)
})
f <- future({
any.integer64(2)
})Calling: v <- value(f), which I think is what To prevent library(future)
plan(multisession)
suppressPackageStartupMessages({
library(bit64)
})
f <- future({
any.integer64(2)
}, conditions = structure("condition", exclude = "packageStartupMessage"))
v <- value(f)
v
#> [1] TRUEPS. I can imagine this will become a FAQ. Having to write |
Beta Was this translation helpful? Give feedback.
Hi, here's a minimal reproducible example of the problem:
Calling:
, which I think is what
myTask$result()calls internally, will relay thepackageStartupMessagethat was generated on the parallel worker.To prevent
packageStartupMessageconditions from being relayed back to the main R session, we can tell the future to not collect such conditions in the first place;