# Stale compile cache moving to Julia 1.6.0?

**URL:** https://discourse.julialang.org/t/stale-compile-cache-moving-to-julia-1-6-0/58678
**Category:** General Usage
**Tags:** compilation
**Created:** [April 6, 2021, 11:27am UTC](https://discourse.julialang.org/t/stale-compile-cache-moving-to-julia-1-6-0/58678 "2021-04-06T11:27:30Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Philippe\_Maincon1](https://avatars.discourse-cdn.com/v4/letter/p/ec9cab/32.png) [@Philippe\_Maincon1](https://discourse.julialang.org/u/Philippe_Maincon1)
#### Post date: [April 6, 2021, 11:27am UTC](https://discourse.julialang.org/t/stale-compile-cache-moving-to-julia-1-6-0/58678/1 "2021-04-06T11:27:30Z")

</div>

Hi,

I am moving my code to Julia 1.6.0 (from 1.4.x), and in doing so am encountering a problem for which I am not able to create an MWE:

I have a module `SaidModule`, which exports some short names like

```julia
export R11
const R11 = AbstractVector{A} where {A<:AbstractVector{R}} where {R<:Real}

```

now writing

```julia
using SaidModule
R11

```

at the REPL gets me

```julia
ERROR: UndefVarError: R11 not defined

```

That in itself is mystifying. But add the following: other `const` defined in the same module, get exported and are available for use. Copying the module file to `SaidModule2` (and changing the name of the module accordingly), using the new module: everything works fine. Similarly, attempts to write an MWE fail. I have a case in another module in which for one given data type, some constructor methods are available, but another method is not.

I suspect this is a stale compile cache story. When moving to Julia 1.6.0, I did try to compile (using `Revise`) _before_ doing a `Pkg.Update()` and I reckon that corrupted something.

Trying to repair things, I deleted `~\.julia\compiled\v1.6\SaidModule.ji`, started a fresh Julia session: no difference. There is still some compile data hiding somewhere?

Any ideas?

Philippe

---

<div class="post-metadata">

### Author: ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)
#### Post date: [April 6, 2021, 11:45am UTC](https://discourse.julialang.org/t/stale-compile-cache-moving-to-julia-1-6-0/58678/2 "2021-04-06T11:45:58Z")

</div>

Things to try:

- Run julia with `--compiled-modules=no`. Does anything change?
- Remove the complete `.julia/compiled` folder. Does anything change?

---

<div class="post-metadata">

### Author: ![Philippe\_Maincon1](https://avatars.discourse-cdn.com/v4/letter/p/ec9cab/32.png) [@Philippe\_Maincon1](https://discourse.julialang.org/u/Philippe_Maincon1)
#### Post date: [April 6, 2021, 12:09pm UTC](https://discourse.julialang.org/t/stale-compile-cache-moving-to-julia-1-6-0/58678/3 "2021-04-06T12:09:23Z")

</div>

Hi Kristoffer,

Now it works … but I don’t know why! In the process of looking around on how to follow your first suggestion, from Atom, I closed Atom and relaunched it. I also clicked my way into the Atom menu Juno/Start Julia. Then, when I ran my code, the compiler got to work and swoosh, my test suit went through _without a single breaking change from 1.4 to 1.6_ (applause!). So I reckon the case is closed… 😀

Well, thanks anyway, I do appreciate.

Philippe
