JuliaTesting / ReferenceTests.jl

Utility package for comparing data against reference files
https://juliatesting.github.io/ReferenceTests.jl/latest/
Other
82 stars 14 forks source link

Add `ReferenceTests` failed in MacOS #15

Closed johnnychen94 closed 6 years ago

johnnychen94 commented 6 years ago

When precompile ReferenceTests in MacOS, Julia v1.0.0, it throws some weird error:

[ Info: Precompiling ReferenceTests [324d217c-45ce-50fc-942e-d289b448e8cf]
ERROR: LoadError: UndefVarError: Test not defined
Stacktrace:
 [1] include at ./boot.jl:317 [inlined]
 [2] include_relative(::Module, ::String) at ./loading.jl:1038
 [3] include(::Module, ::String) at ./sysimg.jl:29
 [4] top-level scope at none:2
 [5] eval at ./boot.jl:319 [inlined]
 [6] eval(::Expr) at ./client.jl:389
 [7] top-level scope at ./none:3
in expression starting at /Users/jc/.julia/packages/ReferenceTests/Xm2oo/src/ReferenceTests.jl:3
ERROR: Failed to precompile ReferenceTests [324d217c-45ce-50fc-942e-d289b448e8cf] to /Users/jc/.julia/compiled/v1.0/ReferenceTests/Rkqd1.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] macro expansion at ./logging.jl:313 [inlined]
 [3] compilecache(::Base.PkgId, ::String) at ./loading.jl:1184
 [4] precompile(::Pkg.Types.Context) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/Pkg/src/API.jl:489
 [5] do_precompile!(::Dict{Symbol,Any}, ::Array{String,1}, ::Dict{Symbol,Any}) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/Pkg/src/REPLMode.jl:586
 [6] #invokelatest#1(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::Any, ::Any, ::Vararg{Any,N} where N) at ./essentials.jl:686
 [7] invokelatest(::Any, ::Any, ::Vararg{Any,N} where N) at ./essentials.jl:685
 [8] do_cmd!(::Pkg.REPLMode.PkgCommand, ::REPL.LineEditREPL) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/Pkg/src/REPLMode.jl:542
 [9] #do_cmd#30(::Bool, ::Function, ::REPL.LineEditREPL, ::String) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/Pkg/src/REPLMode.jl:507
 [10] do_cmd at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/Pkg/src/REPLMode.jl:503 [inlined]
 [11] (::getfield(Pkg.REPLMode, Symbol("##41#44")){REPL.LineEditREPL,REPL.LineEdit.Prompt})(::REPL.LineEdit.MIState, ::Base.GenericIOBuffer{Array{UInt8,1}}, ::Bool) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/Pkg/src/REPLMode.jl:842
 [12] #invokelatest#1 at ./essentials.jl:686 [inlined]
 [13] invokelatest at ./essentials.jl:685 [inlined]
 [14] run_interface(::REPL.Terminals.TextTerminal, ::REPL.LineEdit.ModalInterface, ::REPL.LineEdit.MIState) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/REPL/src/LineEdit.jl:2261
 [15] run_frontend(::REPL.LineEditREPL, ::REPL.REPLBackendRef) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/REPL/src/REPL.jl:1029
 [16] run_repl(::REPL.AbstractREPL, ::Any) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/REPL/src/REPL.jl:191
 [17] (::getfield(Base, Symbol("##720#722")){Bool,Bool,Bool,Bool})(::Module) at ./logging.jl:311
 [18] #invokelatest#1 at ./essentials.jl:686 [inlined]
 [19] invokelatest at ./essentials.jl:685 [inlined]
 [20] macro expansion at ./logging.jl:308 [inlined]
 [21] run_main_repl(::Bool, ::Bool, ::Bool, ::Bool, ::Bool) at ./client.jl:330
 [22] exec_options(::Base.JLOptions) at ./client.jl:242
 [23] _start() at ./client.jl:421

But if I clone and include it in following ways, it would be okay

(v1.0) pkg> activate .

julia> include("src/ReferenceTests.jl")
Main.ReferenceTests

julia> using .ReferenceTests

Also, REQUIRE says ImageInTerminal v0.3 is required, however, the highest version avaliable in MacOS seems to be ImageInTErminal v0.2.1.

Ubuntu 16.04, Julia v1.0.0 doesn't have this issue.

Evizero commented 6 years ago

Thanks for the report. I'll take a look at this later when I find some spare time

Evizero commented 6 years ago

I can't reproduce this problem in OSX julia 1.0. ImageInTerminal installs as 0.3 as expected and ReferenceTests also precompiles without issues for me (just a couple depwarns). did you try to update with ]up ?

johnnychen94 commented 6 years ago

Sorry to bother you, it seems to be the problem of my General registry

  Updating registry at `~/.julia/registries/General`
┌ Warning: Some registries failed to update:
│     — `~/.julia/registries/General` — registry dirty
└ @ Pkg.API /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/Pkg/src/API.jl:144

After I delete and rebuild ~/.julia/registries/General, things work.

Evizero commented 6 years ago

No problem. All your recent bug reports are very welcome