Stale compile cache moving to Julia 1.6.0?


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

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

now writing

using SaidModule

at the REPL gets me

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?


Things to try:

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

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… :grinning:

Well, thanks anyway, I do appreciate.