Recompiling stale cache files

I have a similar (and maybe related) issue to what’s described here.

I have two environments, say EnvA and EnvB, which contain two different versions of JuMP: EnvA is on 0.19.2, while EnvB is on 0.20. Every time I switch between environments, julia recompiles a “stale cache file”, which is surprising since it’s not in the same environment. This is a bit bothersome since several packages depend on JuMP and that triggers also their recompilation. Also different JuMP versions depend on packages with different versions, and all that could also trigger recompilation for packages in each environment.

I would be happy if it was possible that each environment had its own cache (with its own “hash-like” filename inside .julia/compiled/…). Better still, of course, if the package manager / runtime environment was smart enough to realize that if EnvC had JuMP also on 0.19.2, then it would not require a recompile, but just (for example) produce a (hard?) link.

Thanks for any pointers you might have,

1 Like