From f023f692b663677ed1d2eea0d5a326034f7c668e Mon Sep 17 00:00:00 2001 From: Cody Tapscott Date: Sun, 11 Aug 2024 12:33:53 -0400 Subject: [PATCH] Remove `Random123` as a sub-module This usage of Requires.jl is incompatible with the package extensions introduced in Julia 1.9. It's probably best to make a breaking change here and push folks to use `Random123` directly. --- Project.toml | 3 +-- README.md | 1 - docs/src/man/random123.md | 6 +++--- src/RandomNumbers.jl | 10 +--------- 4 files changed, 5 insertions(+), 15 deletions(-) diff --git a/Project.toml b/Project.toml index a3dbfd6..754b53e 100644 --- a/Project.toml +++ b/Project.toml @@ -2,14 +2,13 @@ name = "RandomNumbers" uuid = "e6cf234a-135c-5ec9-84dd-332b85af5143" author = ["Sunoru "] repo = "https://github.com/JuliaRandom/RandomNumbers.jl.git" -version = "1.5.3" +version = "1.6.0" [deps] Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" Requires = "ae029012-a4dd-5104-9daa-d747884805df" [compat] -Requires = "1" julia = "1" [extras] diff --git a/README.md b/README.md index cc4cdb8..1e7ff3a 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,6 @@ There are four RNG families in this package: A class of RNG based on *exclusive or* and *bit shift*. Note that `Random123` is now made a separate package as [Random123.jl](https://github.com/JuliaRandom/Random123.jl). -You can still use your old code with `RandomNumbers.Random123` as long as you import `Random123` manually. ## Usage diff --git a/docs/src/man/random123.md b/docs/src/man/random123.md index 2834355..0e95413 100644 --- a/docs/src/man/random123.md +++ b/docs/src/man/random123.md @@ -1,9 +1,9 @@ # Random123 Family ```@meta -CurrentModule = RandomNumbers.Random123 +CurrentModule = Random123 DocTestSetup = quote - using RandomNumbers.Random123 + using Random123 end ``` @@ -69,7 +69,7 @@ For detailed usage of each RNG, please refer to the [library docs](@ref Random12 To use Random123, firstly import the module: ```julia -julia> using RandomNumbers.Random123 +julia> using Random123 ``` Take `Philox4x64` for example: diff --git a/src/RandomNumbers.jl b/src/RandomNumbers.jl index 430cd23..1c4487f 100644 --- a/src/RandomNumbers.jl +++ b/src/RandomNumbers.jl @@ -10,7 +10,6 @@ This module exports two types and four submodules: - [`WrappedRNG`](@ref) - [`PCG`](@ref) - [`MersenneTwisters`](@ref) -- [`Random123`](random123.md#Random123.Random123) - [`Xorshifts`](@ref) """ module RandomNumbers @@ -18,7 +17,7 @@ module RandomNumbers export AbstractRNG export WrappedRNG export output_type, seed_type - export PCG, MersenneTwisters, Random123, Xorshifts + export PCG, MersenneTwisters, Xorshifts include("common.jl") include("utils.jl") @@ -31,11 +30,4 @@ module RandomNumbers export randfloat include("randfloat.jl") - - import Requires - function __init__() - # The code of Random123 has been moved to Random123.jl - Requires.@require Random123="74087812-796a-5b5d-8853-05524746bad3" import .Random123 - end - end