I try update from @require to julia 1.9 weak dependency by following the Pkg documentation at a branch of the DistributionFits package.
It works with Require in Julia 1.8.4, but I do not get it to work with Julia 1.9.0-rc2.
I do not want DistributionFits
to depend on Optim
(dependency inversion: dependencies should refer only to stable abstractions, not to volatile concretions). If Optim is available, I define a specific AbstractDistributionFitOptimizer
and configure DistributionFits
to use it.
I do using
using Pkg: Pkg
Pkg.activate(; temp=true)
Pkg.add("Optim")
Pkg.develop("DistributionFits")
using Optim, DistributionFits
How can I acccess the extension module, DistributionFitsOptimExt
? It is not available at the global namespace nor as a name inside DistributionFits
(as with Require). Furthermore, the command DistributionFits.set_optimizer(OptimOptimizer())
inside the extension module seems to not get executed, because the DistributionFits.df_optimizer
is still a NotSetOptimizer
.
What did I miss?