RobotLocomotion / drake

Model-based design and verification for robotics.
https://drake.mit.edu
Other
3.18k stars 1.24k forks source link

Factor out ipopt_solver_internal. #21486

Closed hongkai-dai closed 1 month ago

hongkai-dai commented 1 month ago

Towards #21485 and #18292

I will add code to test the internals of IpoptSolver when I change IpoptSolver class.


This change is Reviewable

jwnimmer-tri commented 1 month ago

The change is that the problematic class/struct moved from the anonymous namespace (which has hidden linker visibility) to the internal namespace (which has public linker visibility). To fix the warning you'll need to move it back to hidden linker visibility, by using the DRAKE_NO_EXPORT macro. See for example the MergeRecord class in drake/geometry/render_gltf_client.

After CI is happy, you can assign the on-call platform reviewer.

jwnimmer-tri commented 1 month ago

Best guess, ipopt_solver_internal.h should be in srcs_enabled not hdrs. We don't want to install it (nor bind it in pydrake).

jwnimmer-tri commented 1 month ago

I imagine that the mosek and gurobi examples of similar internal-file-carving would be on point.