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

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?

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.

1 Like

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.

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).