Open LilithHafner opened 2 days ago
A workaround for suppressing these warnings is
julia> x = Base.JLOptions().warn_overwrite
0x01
julia> unsafe_store!(reinterpret(Ptr{UInt8}, cglobal(:jl_options, Base.JLOptions)), 0x00, fieldoffset(Base.JLOptions, findfirst(==(:warn_overwrite), fieldnames(Base.JLOptions)))+1)
Ptr{UInt8} @0x0000fffec7b91ea8
julia> g()
julia> unsafe_store!(reinterpret(Ptr{UInt8}, cglobal(:jl_options, Base.JLOptions)), x, fieldoffset(Base.JLOptions, findfirst(==(:warn_overwrite), fieldnames(Base.JLOptions)))+1)
Ptr{UInt8} @0x0000fffec7b91ea8
julia> g()
WARNING: Method definition f() in module Main at REPL[27]:1 overwritten on the same line (check for duplicate calls to `include`).
I tried to fix this here https://github.com/JuliaLang/julia/pull/55958