Optimization.jl icon indicating copy to clipboard operation
Optimization.jl copied to clipboard

Remove ModelingToolkit and Symbolics as direct deps of subpackages

Open asinghvi17 opened this issue 3 months ago • 1 comments

Is your feature request related to a problem? Please describe.

I'm always frustrated when precompiling ModelingToolkit.

A couple of sublibraries like OptimizationMOI have MTK as a direct dependency, which adds MTK to the dependency stack, increasing load time and precompile time as well as environment size.

Describe the solution you’d like

It would be good to move MTK to extensions in these packages so that it's not a direct dependency. If necessary Optimization.jl can continue to load MTK and trigger these extensions but I don't imagine that is necessary.

Additional context

cc @meggart @lazarusA @felixcremer

asinghvi17 avatar Sep 15 '25 18:09 asinghvi17

Just as a data point, precompiling ModelingToolkit adds 193 seconds to our testruns:

193381.8 ms ✓ ModelingToolkit

felixcremer avatar Sep 16 '25 15:09 felixcremer