If I make a change in
stdlib/, should I
make the whole Julia, or is it possible to run the unit tests for the particular library without remaking everything? I could not figure out how.
If I make a change in
Revise should be able to revise stdlibs now (using e.g.
Revise.track(Random)). So you can Revise and then just include the
runtests.jl file from the relevant stdlib.
Is it also possible to use
Revise.track(Random) but develop
Random in a separate folder and not
If you have the
Random stdlib at some other folder you can change its uuid,
pkg> develop path/to/Random and then
using Random will use that version. This also works with
Hi, sorry to write on this old subject, I tried to work on Test for issue #31304
Pkg> develop ~/workspace/julia/stdlib/Test, write a test that fail then
Pkg> test Test is working fine, my test is failing, but when I try to make the test pass, whatever I do on ~/workspace/julia/stdlib/Test/src/Test.jl nothing happens.
I’ve tried to write
pushfirst!(LOAD_PATH, "~/workspace/julia/stdlib/") at the beggining of runtest.jl still same result.
How are you developing this particular package ?
You can use Revise, or the method described here: https://github.com/JuliaLang/Pkg.jl#using-the-development-version-of-pkgjl
Edit: Woops, thought this was a new thread, so this answer is just the same as my (and the other) answers above
Thanks, with Revise I couldn’t make it works, it works fine with the method described at pkg.jl repo.
this seems to no longer works in 1.6
$ git -C julia diff diff --git a/stdlib/Random/Project.toml b/stdlib/Random/Project.toml index 6aa9f65374..08fd4dd467 100644 --- a/stdlib/Random/Project.toml +++ b/stdlib/Random/Project.toml @@ -1,5 +1,5 @@ name = "Random" -uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" +uuid = "8a3f8284-a2c9-5f02-9a11-845980a1fd5c" [deps] Serialization = "9e88b42a-f829-5b0c-bbe9-9e923198166b"
pkg> devthe package
$ pkg --project=. dev $PWD/julia/stdlib/Random Resolving package versions... Updating `/tmp/tmp.aW8QKR3jGS/Project.toml` [8a3f8284] + Random v0.0.0 `/tmp/tmp.aW8QKR3jGS/julia/stdlib/Random` Updating `/tmp/tmp.aW8QKR3jGS/Manifest.toml` [8a3f8284] + Random v0.0.0 `/tmp/tmp.aW8QKR3jGS/julia/stdlib/Random`
- Load Revise and Random
julia> using Revise, Random julia> Random.hello() ERROR: UndefVarError: hello not defined
Make some changes
shell> git -C julia diff stdlib/Random/src/ diff --git a/stdlib/Random/src/Random.jl b/stdlib/Random/src/Random.jl index 2cdffd6067..3c38570e15 100644 --- a/stdlib/Random/src/Random.jl +++ b/stdlib/Random/src/Random.jl @@ -8,6 +8,8 @@ Support for generating random numbers. Provides [`rand`](@ref), [`randn`](@ref), """ module Random +hello() = "world" + include("DSFMT.jl") using .DSFMT
julia> Random.hello() "world"
I missed this part, sorry for the noise this indeed works