JuliaRandom / JuliaRandom/RandomExtensions.jl
`random_staticarrays` does not work in Julia 1.9
- Dominant language
- Julia
- Stars
- 19
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
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) ?
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the documented `RandomExtensions.random_staticarrays()` call on Julia 1.9, then inspect `src/sampling.jl` around line 558 and the README example. Determine how the optional StaticArrays behavior should be supported, including the older-version concern raised in the issue. Done means the documented call works without the reported dependency error and the README reflects the supported behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- developer-experience
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100