Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Method definition overwrite warning warns erronously on call overloads. #41273

Closed
KristofferC opened this issue Jun 18, 2021 · 2 comments
Closed
Milestone

Comments

@KristofferC
Copy link
Sponsor Member

Putting

struct Foo end
struct Bar end

for t in (Foo, Bar)
    @eval (::$t)(x) = 1
end

in a a package and using the --warn-overwrite=yes option, Julia will warn with

WARNING: Method definition Any(Any) in module Dup at /Users/kristoffercarlsson/julia/Dup/src/Dup.jl:9 overwritten on the same line (check for duplicate calls to `include`).
WARNING: Method definition Any(Any) in module Dup at /Users/kristoffercarlsson/julia/Dup/src/Dup.jl:9 overwritten on the same line (check for duplicate calls to `include`).

I'm guessing this if from #36609.

Looking at some random PkgEval log there are thousands of these warnings, e.g. https://s3.amazonaws.com/julialang-reports/nanosoldier/pkgeval/by_hash/aa3a19f_vs_dd12291/ADCME.1.7.0-beta1-ef3861cb06.log:

WARNING: Method definition Any(Any) in module PyCall at /home/pkgeval/.julia/packages/PyCall/BD546/src/io.jl:81 overwritten on the same line (check for duplicate calls to `include`).
  ** incremental compilation may be fatally broken for this module **

WARNING: Method definition Any(Any, Any) in module PyCall at /home/pkgeval/.julia/packages/PyCall/BD546/src/io.jl:98 overwritten on the same line (check for duplicate calls to `include`).
  ** incremental compilation may be fatally broken for this module **

WARNING: Method definition Any(Any) in module PyCall at /home/pkgeval/.julia/packages/PyCall/BD546/src/io.jl:98 overwritten on the same line (check for duplicate calls to `include`).
  ** incremental compilation may be fatally broken for this module **

WARNING: Method definition Any(Any) in module PyCall at /home/pkgeval/.julia/packages/PyCall/BD546/src/io.jl:103 overwritten on the same line (check for duplicate calls to `include`).
  ** incremental compilation may be fatally broken for this module **

WARNING: Method definition Any(Any) in module PyCall at /home/pkgeval/.julia/packages/PyCall/BD546/src/io.jl:110 overwritten on the same line (check for duplicate calls to `include`).
  ** incremental compilation may be fatally broken for this module **

WARNING: Method definition Any(Any, Any) in module PyCall at /home/pkgeval/.julia/packages/PyCall/BD546/src/io.jl:114 overwritten on the same line (check for duplicate calls to `include`).
  ** incremental compilation may be fatally broken for this module **

WARNING: Method definition Any(Any) in module PyCall at /home/pkgeval/.julia/packages/PyCall/BD546/src/io.jl:95 overwritten on the same line (check for duplicate calls to `include`).
  ** incremental compilation may be fatally broken for this module **

WARNING: Method definition Any(Any...) in module PyCall at /home/pkgeval/.julia/packages/PyCall/BD546/src/pyfncall.jl:86 overwritten on the same line (check for duplicate calls to `include`).
  ** incremental compilation may be fatally broken for this module **

WARNING: Method definition Any(Any) in module PyCall at /home/pkgeval/.julia/packages/PyCall/BD546/src/io.jl:82 overwritten on the same line (check for duplicate calls to `include`).
  ** incremental compilation may be fatally broken for this module **

WARNING: Method definition Any(Any) in module PyCall at /home/pkgeval/.julia/packages/PyCall/BD546/src/io.jl:94 overwritten on the same line (check for duplicate calls to `include`).
  ** incremental compilation may be fatally broken for this module **

cc @vtjnash

@KristofferC KristofferC added this to the 1.7 milestone Jun 18, 2021
@KristofferC
Copy link
Sponsor Member Author

Also, it shows e.g:

WARNING: Method definition (::ForwardDiff.InnerGradientForHess{R, C, F})(Any, Any) in module ForwardDiff at /home/pkgeval/.julia/packages/ForwardDiff/QOqCN/src/hessian.jl:48 overwritten on the same line (check for duplicate calls to `include`).
  ** incremental compilation may be fatally broken for this module **

at https://github.com/JuliaDiff/ForwardDiff.jl/blob/909976d719fdbd5fec91a159c6e2d808c45a770f/src/hessian.jl#L48-L53

but I don't understand that.

@KristofferC
Copy link
Sponsor Member Author

Dup of #41156 perhaps?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants