Tests fail on Julia master (1.4)
Closed this issue · 2 comments
KristofferC commented
The tests here starts failing immidiately on Julia master (1.4):
Mocking: Test Failed at /home/pkgeval/.julia/packages/Mocking/hFQQ4/test/targets.jl:12
Expression: #= /home/pkgeval/.julia/packages/Mocking/hFQQ4/test/targets.jl:12 =# @mock(global_scope()) != global_scope()
Evaluated: "org" != "org"
Stacktrace:
[1] (::var"#190#191")() at /home/pkgeval/.julia/packages/Mocking/hFQQ4/test/targets.jl:12
[2] apply(::var"#190#191", ::Mocking.PatchEnv) at /home/pkgeval/.julia/packages/Mocking/hFQQ4/src/patch.jl:64
[3] apply(::Function, ::Patch{typeof(global_scope)}; debug::Bool) at /home/pkgeval/.julia/packages/Mocking/hFQQ4/src/patch.jl:71
[4] apply(::Function, ::Patch{typeof(global_scope)}) at /home/pkgeval/.julia/packages/Mocking/hFQQ4/src/patch.jl:71
[5] top-level scope at /home/pkgeval/.julia/packages/Mocking/hFQQ4/test/targets.jl:11
[6] include(::String) at ./client.jl:439
[7] macro expansion at /home/pkgeval/.julia/packages/Mocking/hFQQ4/test/runtests.jl:16 [inlined]
[8] macro expansion at /workspace/srcdir/usr/share/julia/stdlib/v1.4/Test/src/Test.jl:1116 [inlined]
[9] top-level scope at /home/pkgeval/.julia/packages/Mocking/hFQQ4/test/runtests.jl:11
It would be nice if we could figure out the root cause to see if this is due to a regression in Julia.
omus commented
I've looked into the issue and it does appear to be a Julia issue
Julia 1.3
julia> f() = 1
f (generic function with 1 method)
julia> methods(f, ())
# 1 method for generic function "f":
[1] f() in Main at REPL[1]:1
Julia 1.4
julia> f() = 1
f (generic function with 1 method)
julia> methods(f, ())
# 0 methods for generic function "f":
I'll file an issue.
omus commented
Now fixed in the latest Julia nightly