Seemingly Random Precompilation Errors: "does not support precompilation but is imported by a module that does"


Something that has been happening to me for awhile is that, every once in awhile, I have things no working due to this kind of precompilation error:

INFO: Recompiling stale cache file /home/crackauc/.julia/lib/v0.5/DataStructures.ji for module DataStructures.
WARNING: Module Compat with uuid 1020441384454244 is missing from the cache.
This may mean module Compat does not support precompilation but is imported by a module that does.
ERROR: LoadError: Declaring __precompile__(false) is not allowed in files that are being precompiled.
 in macro expansion; at ./none:2 [inlined]
 in anonymous at ./<missing>:?
while loading /home/crackauc/.julia/v0.5/DataStructures/src/DataStructures.jl, in expression starting on line 5

It usually ends up with Compat being the problem (and I would be surprised if it really is?), while sometimes it’s other packages. Sometimes there are two packages which both precompile and require Compat, but one gives this error and the other does not. Sometimes I wait a day or Pkg.update() with nothing really happening, but it magically disappears.

Does anyone know what’s going on here? Is there a quick fix (a cache to delete)?

How to disable precompilation on Travis-CI?

I have had success deleting the relevant packages from ~/.julia/lib, the precompilation cache, when I’ve run across these errors in the past.


I’ve had that not work before, which utterly confuses me (maybe it still used it from the recycle bin?). That’s why I can’t pin down what exactly it is.


Could this be If so, the workaround is just to relaunch Julia and try again to import the module.


Killing all running julia processes and then trying to precompile again has worked pretty well for me.


Do tests (Pkg.test) run in a separate process that stay open? I’ve had it before where I couldn’t get tests to not mess up like this, even though I had quit out of the REPL/Atom.

Good to see I’m not alone on this though. I thought it might’ve just been me :slight_smile:


They run in separate processes, I think, but shouldn’t stay open afterwards. I think this might happen sometimes when precompilation fails in Juno and there are multiple processes open in a failed state or something, but that’s mostly speculation…