JuliaRandom / JuliaRandom/RandomExtensions.jl

`random_staticarrays` does not work in Julia 1.9

未关闭
#23 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Julia
星标
19
派生
2
PR 合并指标
30 天内没有已合并 PR

描述

I am right now updating the README (PR will come shortly). Doing so I noticed that the README suggests:
```
julia> RandomExtensions.random_staticarrays() # poor man's conditional modules!
# ugly warning
```

But I don't get an ugly warning, I get an error, no matter what I try (and looking at the code, it is exactly the error I would expect):
```
julia> RandomExtensions.random_staticarrays() # poor man's conditional modules!
ERROR: ArgumentError: Package RandomExtensions does not have StaticArrays in its dependencies:
- You may have a partially installed environment. Try `Pkg.instantiate()`
to ensure all packages in the environment are installed.
- Or, if you have RandomExtensions checked out for development and have
added StaticArrays as a dependency but haven't updated your primary
environment's manifest file, try `Pkg.resolve()`.
- Otherwise you may need to report an issue with RandomExtensions
Stacktrace:
[1] macro expansion
@ ./loading.jl:1634 [inlined]
[2] macro expansion
@ ./lock.jl:267 [inlined]
[3] require(into::Module, mod::Symbol)
@ Base ./loading.jl:1611
[4] eval
@ ./boot.jl:370 [inlined]
[5] random_staticarrays()
@ RandomExtensions ~/.julia/dev/RandomExtensions/src/sampling.jl:558
[6] top-level scope
@ REPL[4]:1
```

It looks to me as if this should be redone using a package extension (or perhaps Requires.jl for older Julia versions) ?

贡献指南

这个仓库没有索引到贡献指南

调研方向

在 Julia 1.9 上复现文档中的 `RandomExtensions.random_staticarrays()` 调用,然后检查 `src/sampling.jl` 第 558 行附近的内容以及 README 示例。确定应如何支持可选的 StaticArrays 行为,包括 issue 中提出的旧版本问题。文档中的调用能够正常工作且不会出现所报告的依赖错误,并且 README 反映受支持的行为,即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
julia
领域
developer-experience
Issue 类型
缺陷
难度
5/5
预计耗时
一周以上
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。