Nonconvex.jl
Nonconvex.jl copied to clipboard
Conflict with NLopt
optimize in Nonconvex will conflict with optimize in NLopt. Better resolve it when import both
This is why I use import NLopt in the docs, not using. I don't think there is a better way to resolve this.
https://discourse.julialang.org/t/two-modules-with-the-same-exported-function-name-but-different-signature/15231/2 Will this work?
No because we can't extend NLopt's optimize without depending on it which I don't (it's an optional dependency) and NLopt can't do the same without depending on Nonconvex which also doesn't make sense. Also extending functions you don't own by dispatching on types you don't own is bad practice in Julia, called type piracy. It's bad because it modifies the behavior of code that may not have anything to do with Nonconvex. You can get away with it every once in a while but only when it's absolutely necessary and there is little risk.
Would be nice to have a warning in the docs saying that you must use import not using.
If you use using, you will need to use Nonconvex.optimize later.