How to not precompile an optional dependency?

I’m working on a project that requires a proprietary solver (Gurobi and a license) for a particular feature. I would like other users to be able to use the package even though they do not have installed gurobi on their machine. Of course they would not be able to use whatever features of the package needs Gurobi.

Currently, on a computer that does not have the ad hoc solver installed, I can’t load the project because Gurobi is in the manifest and fails to build.

I would like to know if there exists a way to tell julia that I don’t wan’t that dependency to be precompiled so that I can use the rest of the package.

Many thanks!

1 Like

You might be looking for Requires.jl.


Ha yes thank you, it looks like exactly what I was looking for.