JuliaLinearAlgebra / AppleAccelerate.jl

Julia interface to the macOS Accelerate framework
Other
96 stars 18 forks source link

Warning: Method definition overwritten on the same line #39

Closed mcabbott closed 3 years ago

mcabbott commented 3 years ago

This package gives warnings during precompilation, on Julia nightly:

julia> using AppleAccelerate
[ Info: Precompiling AppleAccelerate [13e28ba4-7ad8-5781-acae-3021b1ed3924]
WARNING: Method definition blackman(Int64) in module AppleAccelerate at /Users/me/.julia/packages/AppleAccelerate/lc8gu/src/DSP.jl:227 overwritten on the same line (check for duplicate calls to `include`).
  ** incremental compilation may be fatally broken for this module **

WARNING: Method definition blackman(Int64, DataType) in module AppleAccelerate at /Users/me/.julia/packages/AppleAccelerate/lc8gu/src/DSP.jl:227 overwritten on the same line (check for duplicate calls to `include`).
  ** incremental compilation may be fatally broken for this module **

[...and 6 more ...]

┌ Warning: The call to compilecache failed to create a usable precompiled cache file for AppleAccelerate [13e28ba4-7ad8-5781-acae-3021b1ed3924]
│   exception = Required dependency Statistics [10745b16-79ce-11e8-11f9-7d13ad32a3b2] failed to load from a cache file.
└ @ Base loading.jl:1043

julia> VERSION
v"1.6.0-DEV.707"

It looks like this is because some of the method definitions inside a loop don't depend on the loop variables (T, suff):

https://github.com/JuliaMath/AppleAccelerate.jl/blob/c1fc438b40a87682c8194704f1246a928ea7445e/src/DSP.jl#L219-L230

simonbyrne commented 3 years ago

Care to open a pull request?

mcabbott commented 3 years ago

I can do. I was half hoping that someone would tell me this is just a temporary problem or some problem with how I'm using it... you think it isn't, then?

simonbyrne commented 3 years ago

No, it shouldn't be in the @eval for loop

mcabbott commented 3 years ago

Done. Should I add a commit calling this v0.3.1?

simonbyrne commented 3 years ago

Yes, that would be helpful, thanks!