# Separate compile cache for \`julia-debug\`?

**URL:** https://discourse.julialang.org/t/separate-compile-cache-for-julia-debug/30032
**Category:** General Usage
**Created:** [October 17, 2019, 6:52pm UTC](https://discourse.julialang.org/t/separate-compile-cache-for-julia-debug/30032 "2019-10-17T18:52:50Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![twadleigh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/twadleigh/32/22778_2.png) [@twadleigh](https://discourse.julialang.org/u/twadleigh)
#### Post date: [October 17, 2019, 6:52pm UTC](https://discourse.julialang.org/t/separate-compile-cache-for-julia-debug/30032/1 "2019-10-17T18:52:50Z")

</div>

Whenever I run `julia-debug` for the first time in a while, I get:

```julia
[Info: Precompiling Revise ...]

```

as it is initialized in my `startup.jl`. And, generally, the compile cache is invalidated and everything recompiled. When I switch back to using `julia`, the same thing happens.

Is there a way to configure things so that `julia-debug` gets its own compile cache?

---

<div class="post-metadata">

### Author: ![musm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/musm/32/3675_2.png) [@musm](https://discourse.julialang.org/u/musm)
#### Post date: [October 17, 2019, 7:39pm UTC](https://discourse.julialang.org/t/separate-compile-cache-for-julia-debug/30032/2 "2019-10-17T19:39:09Z")

</div>

> [@twadleigh](#):
>
> Is there a way to configure things so that `julia-debug` gets its own compile cache?

Which version of Julia are you on? You may want to try the latest release candidate for 1.3 ? I don’t know if addresses the issue for `julia-debug` but the problem is addressed for the non-debug `julia` executable.

---

<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: [October 17, 2019, 7:45pm UTC](https://discourse.julialang.org/t/separate-compile-cache-for-julia-debug/30032/3 "2019-10-17T19:45:40Z")

</div>

> [@musm](#):
>
> I don’t know if addresses the issue for `julia-debug` but the problem is addressed for the non-debug `julia` executable.

I don’t think it helps with the issue here unfortunately.

---

<div class="post-metadata">

### Author: ![GunnarFarneback](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gunnarfarneback/32/1827_2.png) [@GunnarFarneback](https://discourse.julialang.org/u/GunnarFarneback)
#### Post date: [October 17, 2019, 8:00pm UTC](https://discourse.julialang.org/t/separate-compile-cache-for-julia-debug/30032/4 "2019-10-17T20:00:41Z")

</div>

Would using a separate depot (`JULIA_DEPOT_PATH`) be an option for your use case?

---

<div class="post-metadata">

### Author: ![twadleigh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/twadleigh/32/22778_2.png) [@twadleigh](https://discourse.julialang.org/u/twadleigh)
#### Post date: [October 18, 2019, 12:37am UTC](https://discourse.julialang.org/t/separate-compile-cache-for-julia-debug/30032/5 "2019-10-18T00:37:03Z")

</div>

Creating a separate depot is a bit of a heavyweight solution, but may be an acceptable workaround for my purposes. I’ll give it a try.

---

<div class="post-metadata">

### Author: ![tkf](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tkf/32/17635_2.png) [@tkf](https://discourse.julialang.org/u/tkf)
#### Post date: [October 18, 2019, 12:44am UTC](https://discourse.julialang.org/t/separate-compile-cache-for-julia-debug/30032/6 "2019-10-18T00:44:58Z")

</div>

I think fixing this is as easy as adding `JLOptions().julia_bin` to `package_slug`. See:

[https://github.com/JuliaLang/julia/pull/29914](https://github.com/JuliaLang/julia/pull/29914)

---

<div class="post-metadata">

### Author: ![twadleigh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/twadleigh/32/22778_2.png) [@twadleigh](https://discourse.julialang.org/u/twadleigh)
#### Post date: [October 23, 2019, 11:02pm UTC](https://discourse.julialang.org/t/separate-compile-cache-for-julia-debug/30032/7 "2019-10-23T23:02:43Z")

</div>

That looks _much_ closer to what I would call the “right” solution. Thanks for the heads-up, @tkf.

---

<div class="post-metadata">

### Author: ![twadleigh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/twadleigh/32/22778_2.png) [@twadleigh](https://discourse.julialang.org/u/twadleigh)
#### Post date: [October 24, 2019, 9:39pm UTC](https://discourse.julialang.org/t/separate-compile-cache-for-julia-debug/30032/8 "2019-10-24T21:39:14Z")

</div>

I opened an [issue](https://github.com/JuliaLang/julia/issues/33668) and submitted a [one-line PR](https://github.com/JuliaLang/julia/pull/33669) that fixes this. Fingers crossed, some version of it gets merged.
