Can I (disable or) know somehow that precompilation will not happen at runtime?

I was running:

pkg> test Plots

ad somehow my machine got unstable, with OOM, as sometimes hapens with the (parallel) precompilation. I wasn’t expecting at that point.

What I had done before was I installed Plots, and Julia started precompiling a lot of packages and I stopped it after I saw Plots had been precompiled with CTRL-C.

What would be ideal is that precompilation of a package precompiles all its dependencies first, i.e. recursively. I’m not sure if that happens, likely not seemingly.

I’m not sure if this is a problem specific to running tests, but I’m thinking, could precompile happen at any time? It would be really bad and I want to know if there’s a way to know if all (relevant) code has been precompiled already.

What would be ideal is that precompilation of a package precompiles all its dependencies first, i.e. recursively.

That’s exactly what happens. The issue is that tests run with --check-bounds=yes, and that requires all the packages to be (re)compiled (it’s different generated code, not something you can flip on at runtime).

2 Likes

Ok, good to know, then since code is only precompiled for one scenario (and you don’t want “fat binaries”, for two or more), is there still a way to a) disable precompilation (at least just for test, or do it one package at a time, lazily)? At least the parallel part, that is problematic.

And for the common case, non-tests, you can make sure everything is precompiled, but is there a good way to know for sure everything is? I’m a bit worried that anything can at any point trigger it. Can you somehow get a list of the packages that aren’t? Do invalidations or something make already precompield package outdated?

Is there an opt-in way to run tests with the default for bound checks? [I know why it’s not done by default, since safer…]