Incremental compilation broken

I get this:

WARNING: Method definition (::Type{Float32})(Base.Irrational{:loghalf}) in module IrrationalConstants at irrationals.jl:190 overwritten in module StatsFuns on the same line (check for duplicate calls to `include`).    
  ** incremental compilation may be fatally broken for this module **

WARNING: Method definition (::Type{Float32})(Base.Irrational{:inv2π}) in module IrrationalConstants at irrationals.jl:190 overwritten in module StatsFuns on the same line (check for duplicate calls to `include`).      
  ** incremental compilation may be fatally broken for this module **

WARNING: Method definition (::Type{Float32})(Base.Irrational{:sqrtπ}) in module IrrationalConstants at irrationals.jl:190 overwritten in module StatsFuns on the same line (check for duplicate calls to `include`).
  ** incremental compilation may be fatally broken for this module **

WARNING: Method definition (::Type{Float32})(Base.Irrational{:sqrt3}) in module IrrationalConstants at irrationals.jl:190 overwritten in module StatsFuns on the same line (check for duplicate calls to `include`).      
  ** incremental compilation may be fatally broken for this module **

WARNING: Method definition (::Type{Float32})(Base.Irrational{:sqrt2}) in module IrrationalConstants at irrationals.jl:190 overwritten in module StatsFuns on the same line (check for duplicate calls to `include`).
  ** incremental compilation may be fatally broken for this module **

WARNING: Method definition (::Type{Float32})(Base.Irrational{:logπ}) in module IrrationalConstants at irrationals.jl:190 overwritten in module StatsFuns on the same line (check for duplicate calls to `include`).       
  ** incremental compilation may be fatally broken for this module **

WARNING: Method definition (::Type{Float32})(Base.Irrational{:sqrt4π}) in module IrrationalConstants at irrationals.jl:190 overwritten in module StatsFuns on the same line (check for duplicate calls to `include`).     
  ** incremental compilation may be fatally broken for this module **

WARNING: Method definition (::Type{Float32})(Base.Irrational{:log4π}) in module IrrationalConstants at irrationals.jl:190 overwritten in module StatsFuns on the same line (check for duplicate calls to `include`).      
  ** incremental compilation may be fatally broken for this module **

WARNING: Method definition (::Type{Float32})(Base.Irrational{:invπ}) in module IrrationalConstants at irrationals.jl:190 overwritten in module StatsFuns on the same line (check for duplicate calls to `include`).       
  ** incremental compilation may be fatally broken for this module **

what is wrong?

How do you get this? I.e. what’s the MWE that leads to these warnings being displayed?

Chances are that you include file “irrationals.jl” in two separate places in your code.

I never explicitly include irrationsl.jl, I only import Packages that might use it.

Hence my question for what you’re doing to get this warning - without an MWE, all we can do is list potential sources of the problem, like Francois did, but that’s not a very efficient way of working this out.

I know, sry I will try to post a MWE

1 Like

It can be hard to make a MWE for these sorts of errors such that others can reproduce. In the past, I used to get these sorts of warnings when I kept a lot of packages in my main v1.6 environment. Ever since I’ve started keeping only a very minimal v1.6 environment (only Revise, BenchmarkTools, etc) and adding packages mainly to project environments, I don’t see these warnings any longer. So I suspect it’s related to challenges with correctly stacking environments.

4 Likes

I never experienced this issue until I started using DifferentialEquations, which causes the issue rather often (no MWE, I know). Creating a new environment does the trick, but sometimes one needs an env with a bunch of packages, unfortunately.

WARNING: Method definition Type##kw(Any, Type{Base.MPFR.BigFloat}, Base.Irrational{:logπ}) in module StatsFuns at irrationals.jl:182 overwritten in module IrrationalConstants on the same line (check for duplicate calls to `include`).
  ** incremental compilation may be fatally broken for this module **

WARNING: Method definition Type##kw(Any, Type{Base.MPFR.BigFloat}, Base.Irrational{:log4π}) in module StatsFuns at irrationals.jl:182 overwritten in module IrrationalConstants on the same line (check for duplicate calls to `include`).
  ** incremental compilation may be fatally broken for this module **

WARNING: Method definition Type##kw(Any, Type{Base.MPFR.BigFloat}, Base.Irrational{:quartπ}) in module StatsFuns at irrationals.jl:182 overwritten in module IrrationalConstants on the same line (check for duplicate calls to `include`).
  ** incremental compilation may be fatally broken for this module **

WARNING: Method definition Type##kw(Any, Type{Base.MPFR.BigFloat}, Base.Irrational{:inv2π}) in module StatsFuns at irrationals.jl:182 overwritten in module IrrationalConstants on the same line (check for duplicate calls to `include`).
  ** incremental compilation may be fatally broken for this module **