Closed DarwinAwardWinner closed 3 years ago
Thanks for reporting. I can reproduce this with both future.apply::future_lapply()
and furrr::future_map()
, which suggests a bug in future::getGlobalsAndPackages()
or possible higher up in the globals package.
Some good news: This is related to https://github.com/HenrikBengtsson/globals/issues/72 and I've verified that @DavisVaughan's suggestion there solves the problem reported here. Thus, this will be solved soon. What needs to be figured out is whether it should be fixed in globals or future, which is a design decision. After that, the fix needs to validated against all reverse package dependencies. Then I'll roll out the fix.
So, stay tuned. I'll keep this issue open to remind me to add a package test for this bug.
This has now been fixed in the next relase of the future package (to become future 1.22.0). The following now works as expected:
library(future.apply)
X <- list(sample(letters, size = 100, replace = TRUE))
y1 <- future_lapply(X, FUN = table)
library(BiocGenerics)
y2 <- future_lapply(X, FUN = table)
stopifnot(identical(y2, y1))
Thanks for reporting.
Certain functions seem to no longer work with
future_lapply
after being transformed into S4 generics by BiocGenerics, e.g.table
. The problem seems limited to future.apply functions, becausetable
still works insidefuture
.Created on 2021-04-22 by the reprex package (v2.0.0)
This is obviously a problem since pretty much every Bioconductor package loads BiocGenerics.