Skip to content

type TaskLocalRNG has no field seed #26

Closed
@NAThompson

Description

@NAThompson

Following along with the JuliaCon talk:

julia> VERSION
v"1.8.0-DEV.231"
julia> module TheModule
       using ReTest
       @testset "greet" begin
           @test greet() == "hello world"
       end
       @testset "misc" begin
           @test true
       end
       end
Main.TheModule

julia> retest(dry=true)
ERROR: UndefVarError: retest not defined
Stacktrace:
 [1] top-level scope
   @ REPL[4]:1

julia> using ReTest

julia> retest(dry=true)
greet
misc

julia> retest()
                   Pass   Error   Total
greet          |              1       1
Main.TheModule |      0               0

greet: Error During Test at /Users/nathompson7/.julia/packages/ReTest/kj6AC/src/ReTest.jl:212
  Got exception outside of a @test
  type TaskLocalRNG has no field seed
  Stacktrace:
    [1] getproperty(x::Random.TaskLocalRNG, f::Symbol)
      @ Base ./Base.jl:42
    [2] macro expansion
      @ ~/.julia/packages/ReTest/kj6AC/src/testset.jl:467 [inlined]
    [3] macro expansion
      @ REPL[3]:4 [inlined]
    [4] top-level scope
      @ ~/.julia/packages/ReTest/kj6AC/src/ReTest.jl:212
    [5] eval
      @ ./boot.jl:373 [inlined]
    [6] #23
      @ ~/.julia/packages/ReTest/kj6AC/src/ReTest.jl:618 [inlined]
    [7] #161
      @ ~/julia/usr/share/julia/stdlib/v1.8/Distributed/src/remotecall.jl:378 [inlined]
    [8] run_work_thunk(thunk::Distributed.var"#161#162"{ReTest.var"#23#40"{ReTest.Testset.Format}, Tuple{Module, ReTest.TestsetExpr, Regex, NamedTuple{(:out, :compute, :preview), Tuple{Distributed.RemoteChannel{Channel{Union{Nothing, ReTest.Testset.ReTestSet}}}, Channel{Nothing}, Distributed.RemoteChannel{Channel{Union{Nothing, String}}}}}}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}}, print_error::Bool)
      @ Distributed ~/julia/usr/share/julia/stdlib/v1.8/Distributed/src/process_messages.jl:63
    [9] remotecall_fetch(::Function, ::Distributed.LocalProcess, ::Module, ::Vararg{Any}; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
      @ Distributed ~/julia/usr/share/julia/stdlib/v1.8/Distributed/src/remotecall.jl:403
   [10] remotecall_fetch(::Function, ::Distributed.LocalProcess, ::Module, ::Vararg{Any})
      @ Distributed ~/julia/usr/share/julia/stdlib/v1.8/Distributed/src/remotecall.jl:403
   [11] remotecall_fetch(::Function, ::Int64, ::Module, ::Vararg{Any}; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
      @ Distributed ~/julia/usr/share/julia/stdlib/v1.8/Distributed/src/remotecall.jl:445
   [12] remotecall_fetch
      @ ~/julia/usr/share/julia/stdlib/v1.8/Distributed/src/remotecall.jl:445 [inlined]
   [13] macro expansion
      @ ~/.julia/packages/ReTest/kj6AC/src/ReTest.jl:615 [inlined]
   [14] (::ReTest.var"#21#38"{Int64, ReTest.Testset.Format, Regex, Distributed.RemoteChannel{Channel{Union{Nothing, String}}}, ReTest.Testset.ReTestSet, Base.Threads.Atomic{Bool}, Channel{Nothing}, Distributed.RemoteChannel{Channel{Union{Nothing, ReTest.Testset.ReTestSet}}}, Vector{Any}, Module})()
      @ ReTest ./task.jl:411
ERROR: Some tests did not pass: 0 passed, 0 failed, 1 errored, 0 broken.

(On dev version of Julia because I'm on an M1.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions