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

CI issue with precompile #84

Closed Wikunia closed 3 years ago

Wikunia commented 3 years ago

I have an issue with precompilation from ReferenceTests since today here: https://github.com/Wikunia/ConstraintSolver.jl/runs/2030426740?check_suite_focus=true

the error message looks like this:

ERROR: LoadError: AssertionError: precompile(Tuple{typeof(test_reference), File{DataFormat{:PNG}}, Matrix{RGB{Float64}}, Function, Nothing})
Stacktrace:
 [1] top-level scope at /home/runner/.julia/packages/ReferenceTests/44qin/src/ReferenceTests.jl:27

Update: This also happens locally in a new temporary environment just for reference tests:

➜ julia --project=$(mktemp -d)                                                                                                                                                                                                              
               _                                                                                                                                                                                                                            
   _       _ _(_)_     |  Documentation: https://docs.julialang.org                                                                                                                                                                         
  (_)     | (_) (_)    |                                                                                                                                                                                                                    
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.                                                                                                                                                                             
  | | | | | | |/ _` |  |                                                                                                                                                                                                                    
  | | |_| | | | (_| |  |  Version 1.5.3 (2020-11-09)                                                                                                                                                                                        
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release                                                                                                                                                                           
|__/                   |                                                                                                                                                                                                                    

(tmp.FasdasQads) pkg> add ReferenceTests
...
julia> using ReferenceTests
[ Info: Precompiling ReferenceTests [324d217c-45ce-50fc-942e-d289b448e8cf]
ERROR: LoadError: AssertionError: precompile(Tuple{typeof(test_reference), File{DataFormat{:PNG}}, Matrix{RGB{Float64}}, Function, Nothing})
Stacktrace:
 [1] top-level scope at /home/ole/.julia/packages/ReferenceTests/44qin/src/ReferenceTests.jl:27
 [2] include(::Function, ::Module, ::String) at ./Base.jl:380
 [3] include(::Module, ::String) at ./Base.jl:368
 [4] top-level scope at none:2
 [5] eval at ./boot.jl:331 [inlined]
 [6] eval(::Expr) at ./client.jl:467
 [7] top-level scope at ./none:3
in expression starting at /home/ole/.julia/packages/ReferenceTests/44qin/src/ReferenceTests.jl:24
ERROR: Failed to precompile ReferenceTests [324d217c-45ce-50fc-942e-d289b448e8cf] to /home/ole/.julia/compiled/v1.5/ReferenceTests/Rkqd1_jPXuE.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1305
 [3] _require(::Base.PkgId) at ./loading.jl:1030
 [4] require(::Base.PkgId) at ./loading.jl:928
 [5] require(::Module, ::Symbol) at ./loading.jl:923

Any idea why this is happening?

johnnychen94 commented 3 years ago

@timholy Do you happen to know what's the cause to this?

It seems that this can be fixed by removing the two failing precompilation directives but I don't know what's the root cause of this.

timholy commented 3 years ago

Yeah, it's a bad interaction between me being lazy and using an assert where I shouldn't have and adding a type-parameter to FileIO.File, which normally would not be a breaking change but the combination of the two has been bad.

Fixed in #85. I don't have merge privileges, so if you do please merge and register.