JuliaNLSolvers / Optim.jl

Optimization functions for Julia
Other
1.1k stars 214 forks source link

Fix precompilation issue #1088

Closed devmotion closed 3 months ago

devmotion commented 3 months ago

Fixes #1087 (basically in the same way as the implementation in NLOpt, the tiny difference is just that the check in the __init__ function in the extension is also based on isdefined(Base, :get_extension) to ensure there are no cases when Optim.Optimizer is not defined).

This reintroduces MOI as a regular dependency on Julia < 1.9, but IMO this is fine since on Optim <= 1.9.2 MOI was a regular dependency already. On Julia >= 1.9, this PR actually reduces the number of dependencies since PackageExtensionsCompat is removed.

pkofod commented 3 months ago

thanks David!

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 85.46%. Comparing base (7cc8328) to head (1961975).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1088 +/- ## ========================================== + Coverage 85.43% 85.46% +0.02% ========================================== Files 45 45 Lines 3276 3274 -2 ========================================== - Hits 2799 2798 -1 + Misses 477 476 -1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.