Globalenv variables are not picked up by future::getGlobalsAndPackages
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- r
调研方向
首先使用 future::getGlobalsAndPackages 和 multisession 计划运行已报告的 R 复现,然后跟踪函数如何发现通过 env$a 引用的 globals。当检测到 globalenv 中的变量 d,并且示例在没有 object-not-found 错误的情况下返回 2 时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
Describe the bug
I found variables in the globalenv are not correctly picked up. Not sure if this is on purpose
Reproduce example
env <- new.env()
d <- 1
env$a <- function(b){
b + d
}
future::plan("multisession")
f <- future::future({
env$a(1)
})
future::value(f)
#> Error in env$a(1) : object 'd' not found
Expected behavior
Variable d is not picked up by future::getGlobalsAndPackages, otherwise the result should be 2
Session information
Please share your session information after the error has occurred so that we also see which packages and versions are involved, e.g.
> sessionInfo()
R version 4.1.1 (2021-08-10)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS Big Sur 11.5.2
Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/lib/libRlapack.dylib
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_4.1.1 parallelly_1.28.1 parallel_4.1.1 tools_4.1.1
[5] listenv_0.8.0 codetools_0.2-18 digest_0.6.27 globals_0.14.0
[9] future_1.22.1
- 主要语言
- R
- 星标
- 1k
- 派生
- 93
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
futureverse/future 的其他 Issue
-
The first code example in the README does not work可能已有人在做 @sean0407 于 3 天前认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 72/100
futureverse/future#838 · 1 条评论 · 1 个 reaction ·
-
bug
难度 4/5 3-5 天 新手友好度 48/100
futureverse/future#833 ·
-
feature/resources RNG
难度 5/5 一周以上 新手友好度 35/100
futureverse/future#832 ·
-
RNG
难度 5/5 一周以上 新手友好度 38/100
futureverse/future#831 · 1 条评论 ·
-
feature request
难度 5/5 一周以上 新手友好度 30/100
futureverse/future#822 · 1 个 reaction ·
查看 futureverse/future 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 67/100
-
难度 2/5 1-3 小时 新手友好度 64/100
mitchelloharawild/ggtime#39 ·
-
enhancement good first issue help wanted
难度 2/5 半天 新手友好度 82/100
-
难度 2/5 1-3 小时 新手友好度 62/100
-
难度 1/5 1 小时以内 新手友好度 82/100
GSK-Biostatistics/multigrain#43 ·
维护者通常 1 天内回复