# Incremental compilation broken

**URL:** <https://discourse.julialang.org/t/incremental-compilation-broken/71944>\
**Category:** General Usage\
**Tags:** question\
**Created:** [November 23, 2021, 1:58pm UTC](https://discourse.julialang.org/t/incremental-compilation-broken/71944 "2021-11-23T13:58:34Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![ohmsweetohm1](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ohmsweetohm1/32/49126_2.png) [@ohmsweetohm1](https://discourse.julialang.org/u/ohmsweetohm1)\
**Post date:** [November 23, 2021, 1:58pm UTC](https://discourse.julialang.org/t/incremental-compilation-broken/71944/1 "2021-11-23T13:58:34Z")

</div>

I get this:

```julia
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?

---

<div class="post-metadata">

**Author:** ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Post date:** [November 23, 2021, 2:00pm UTC](https://discourse.julialang.org/t/incremental-compilation-broken/71944/2 "2021-11-23T14:00:17Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ffevotte](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ffevotte/32/6587_2.png) [@ffevotte](https://discourse.julialang.org/u/ffevotte)\
**Post date:** [November 23, 2021, 2:02pm UTC](https://discourse.julialang.org/t/incremental-compilation-broken/71944/3 "2021-11-23T14:02:02Z")

</div>

> [@ohmsweetohm1](#):
>
> what is wrong?

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

---

<div class="post-metadata">

**Author:** ![ohmsweetohm1](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ohmsweetohm1/32/49126_2.png) [@ohmsweetohm1](https://discourse.julialang.org/u/ohmsweetohm1)\
**Post date:** [November 23, 2021, 2:03pm UTC](https://discourse.julialang.org/t/incremental-compilation-broken/71944/4 "2021-11-23T14:03:26Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Post date:** [November 23, 2021, 2:05pm UTC](https://discourse.julialang.org/t/incremental-compilation-broken/71944/5 "2021-11-23T14:05:18Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ohmsweetohm1](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ohmsweetohm1/32/49126_2.png) [@ohmsweetohm1](https://discourse.julialang.org/u/ohmsweetohm1)\
**Post date:** [November 23, 2021, 2:07pm UTC](https://discourse.julialang.org/t/incremental-compilation-broken/71944/6 "2021-11-23T14:07:13Z")

</div>

I know, sry I will try to post a MWE

---

<div class="post-metadata">

**Author:** ![ianfiske](https://avatars.discourse-cdn.com/v4/letter/i/58f4c7/32.png) [@ianfiske](https://discourse.julialang.org/u/ianfiske)\
**Post date:** [November 23, 2021, 2:56pm UTC](https://discourse.julialang.org/t/incremental-compilation-broken/71944/7 "2021-11-23T14:56:04Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![sob](https://avatars.discourse-cdn.com/v4/letter/s/65b543/32.png) [@sob](https://discourse.julialang.org/u/sob)\
**Post date:** [January 10, 2023, 2:17am UTC](https://discourse.julialang.org/t/incremental-compilation-broken/71944/8 "2023-01-10T02:17:39Z")

</div>

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.

```julia
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**

```
