Avoid downloading MKL artifact as FFTW dependency

I am developing a package that uses FFTW.
Changing Manifest.toml by adding or removing packages triggers precompilation of all dependencies, during which MKL_jll downloads MKL binary.
BUT MKL in my case is only an optional dependence of FFTW and is not supposed to be used in my package.
Is there a way to skip artifact downloading on precompile?

MKL_jll is loaded only if using MKL as provider explicitly:

So the artifact shouldn’t be loaded unless you’re asking for it.

IIUC, Pkg.precompile() precompiles everything in Manifest, and the artifact is downloaded at that stage.
I’ve found that disabling automatic precompilation at Manifest change seems to solve that issue locally, but more generally it’s weird that everyone getting my package also has to download MKL unless they set a specific environment variable.

1 Like