pre-compilation generating warnings
ExpandingMan opened this issue · 9 comments
This happens when I pre-compile a package that indirectly uses Compat
:
WARNING: eval into closed module Base:
Expr(:block, #= Symbol("/home/savastio/.julia/packages/Compat/hsya0/src/Compat.jl"):1891 =#, Expr(:call, :range, Expr(:parameters, Expr(:..., :kwargs)), :start, :stop) = Expr(:block, #= Symbol("/home/savastio/.julia/packages/Compat/hsya0/src/Compat.jl"):1891 =#, Expr(:call, :range, Expr(:parameters, Expr(:kw, :stop, :stop), Expr(:..., :kwargs)), :start)))
** incremental compilation may be broken for this module **
WARNING: Method definition range(Any, Any) in module Base at range.jl:90 overwritten at /home/savastio/.julia/packages/Compat/hsya0/src/Compat.jl:1891.
WARNING: Method definition #range(Any, typeof(Base.range), Any, Any) in module Base overwritten.
I've tried this with multiple different packages which have Compat
as a dependency in fresh environments, this definitely seems to be a bug with Compat.
I have been having the same issue, on Julia v1.1, MacOS v10.4.1, Compat v1.5.0
Likely caused by #642, cc @martinholters. Maybe we can just do the version check at runtime instead?
Same issue. I think giving a depreciate or warning is appropriate. Maybe we need more time for package developers to do some changes.
I just ran into this. I silenced it for now with pkg> pin Compat@1.4
. I'll probably wait until the warnings are removed from Compat
before unpinning.
I just ran into this. I silenced it for now with
pkg> pin Compat@1.4
. I'll probably wait until the warnings are removed fromCompat
before unpinning.
Same for me - had to pin Compat
.
Likely caused by #642, cc @martinholters. Maybe we can just do the version check at runtime instead?
Yes, that is quite surely the cause. But the problem is that we need to overwrite a Base method even on current Julia, so I don't see how doing the version check at run time could help. But please open a PR if you have an idea. I won't be able to do anything here today but it surely would be nice to have this fixed ASAP.
Maybe we can be smart and restrict the arguments, and don't overwrite the ::Any, ::Any
method in base? Should be fine to restrict to ::Number
for example.
this is really annoying because breaking precomplilation breaks IJulia and other things that do not like it. (Something about precompilation kills certain packages)
Thanks for the quick fix @fredrikekre !