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

Reference tests fail due to world age issues #120

Closed adrhill closed 2 years ago

adrhill commented 2 years ago

I tried updating my package to ReferenceTests v0.10.0 but ran into world age problems when running tests locally on my machine:

  Got exception outside of a @test
  LoadError: MethodError: no method matching XTermColors.TermColor8bit()
  The applicable method may be too new: running in world age 32584, while current world is 32585.
  Closest candidates are:
    XTermColors.TermColor8bit() at ~/.julia/packages/XTermColors/KdKW3/src/colorant2ansi.jl:2 (method too new to be called from this world context.)
  Stacktrace:
    [1] (::ReferenceTests.var"#8#9"{Tuple{Int64, Int64}, Matrix{ColorTypes.RGB{Float64}}})()
      @ ReferenceTests ~/.julia/packages/ReferenceTests/ZTLch/src/utils.jl:78
    [2] withcolor(fun::ReferenceTests.var"#8#9"{Tuple{Int64, Int64}, Matrix{ColorTypes.RGB{Float64}}})
      @ ReferenceTests ~/.julia/packages/ReferenceTests/ZTLch/src/utils.jl:85
    [3] _convert(::Type{FileIO.DataFormat{:TXT}}, img::Matrix{ColorTypes.RGB{Float64}}; size::Tuple{Int64, Int64}, kw::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
      @ ReferenceTests ~/.julia/packages/ReferenceTests/ZTLch/src/fileio.jl:59
    [4] _convert
      @ ~/.julia/packages/ReferenceTests/ZTLch/src/fileio.jl:59 [inlined]
    [5] test_reference(reference_file::FileIO.File{FileIO.DataFormat{:TXT}, String}, raw_actual::Matrix{ColorTypes.RGB{Float64}}, equiv::Nothing, rendermode::Nothing; kw::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
      @ ReferenceTests ~/.julia/packages/ReferenceTests/ZTLch/src/test_reference.jl:123
    [6] test_reference(reference_file::FileIO.File{FileIO.DataFormat{:TXT}, String}, raw_actual::Matrix{ColorTypes.RGB{Float64}}, equiv::Nothing, rendermode::Nothing)
      @ ReferenceTests ~/.julia/packages/ReferenceTests/ZTLch/src/test_reference.jl:120
    [7] test_reference(filename::String, raw_actual::Matrix{ColorTypes.RGB{Float64}}; by::Nothing, render::Nothing, format::Nothing, kw::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
      @ ReferenceTests ~/.julia/packages/ReferenceTests/ZTLch/src/test_reference.jl:110
    [8] test_reference(filename::String, raw_actual::Matrix{ColorTypes.RGB{Float64}})
      @ ReferenceTests ~/.julia/packages/ReferenceTests/ZTLch/src/test_reference.jl:108

This happens in VSCode 1.70.1 on macOS Monterey 12.5.

johnnychen94 commented 2 years ago

Might just need to remove the lazy import macro in this package...