# Is it possible for package precompilation fail quickly if some dependency fails to precompile because of an error?

**URL:** <https://discourse.julialang.org/t/is-it-possible-for-package-precompilation-fail-quickly-if-some-dependency-fails-to-precompile-because-of-an-error/95613>\
**Category:** Internals & Design\
**Tags:** pkg, precompilation\
**Created:** [March 6, 2023, 2:12pm UTC](https://discourse.julialang.org/t/is-it-possible-for-package-precompilation-fail-quickly-if-some-dependency-fails-to-precompile-because-of-an-error/95613 "2023-03-06T14:12:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jishnub](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jishnub/32/33620_2.png) [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Post date:** [March 6, 2023, 2:12pm UTC](https://discourse.julialang.org/t/is-it-possible-for-package-precompilation-fail-quickly-if-some-dependency-fails-to-precompile-because-of-an-error/95613/1 "2023-03-06T14:12:07Z")

</div>

I often come across scenarios where package A depends on B, and making a change to B causes both B and A to precompile. Now, assume that there’s an error in B, and the precompilation fails for it. The precompilation attempt for A continues, and eventually fails. I wonder if it’s possible to abort the precompilation right away in cases where this will fail anyway, as this can be quite time-consuming otherwise?

---

<div class="post-metadata">

**Author:** ![giordano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/giordano/32/2166_2.png) [@giordano](https://discourse.julialang.org/u/giordano)\
**Post date:** [March 6, 2023, 4:41pm UTC](https://discourse.julialang.org/t/is-it-possible-for-package-precompilation-fail-quickly-if-some-dependency-fails-to-precompile-because-of-an-error/95613/2 "2023-03-06T16:41:01Z")

</div>

Just to point out that the fact that A depends on B doesn’t necessarily mean that A actually loads B at all, it may be used conditionally. I’ve had this situation a few times where package B being broken on julia nightly for some reasons doesn’t prevent A from working if B isn’t actually used in the end.

---

<div class="post-metadata">

**Author:** ![mrufsvold](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mrufsvold/32/31600_2.png) [@mrufsvold](https://discourse.julialang.org/u/mrufsvold)\
**Post date:** [March 7, 2023, 10:17pm UTC](https://discourse.julialang.org/t/is-it-possible-for-package-precompilation-fail-quickly-if-some-dependency-fails-to-precompile-because-of-an-error/95613/3 "2023-03-07T22:17:04Z")

</div>

This is definitely true, but I agree with OP that it would be nice to have a switch to fail out fast especially if you’re developing two packages, one that depends on the other.

---

<div class="post-metadata">

**Author:** ![mrufsvold](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mrufsvold/32/31600_2.png) [@mrufsvold](https://discourse.julialang.org/u/mrufsvold)\
**Post date:** [March 7, 2023, 10:52pm UTC](https://discourse.julialang.org/t/is-it-possible-for-package-precompilation-fail-quickly-if-some-dependency-fails-to-precompile-because-of-an-error/95613/4 "2023-03-07T22:52:35Z")

</div>

Relatedly, if there is an error precompiling, I wish that it would just show the error instead of saying “Run precompile to see full error” (paraphrasing).
