symforce-org / symforce

Fast symbolic computation, code generation, and nonlinear optimization for robotics
https://symforce.org
Apache License 2.0
1.41k stars 145 forks source link

Move to spdlog1.10.0 and its embedded fmt 8.1.1 #326

Closed asa closed 11 months ago

asa commented 1 year ago

We are having a large challenge integrating the particular version of spdlog and the external FMT that is downloaded n opt/CMakelists.txt. This version has a bundled fmt that works with the symforce codebase as is. The later spdlog 1.11.0 bumps embedded fmt to 9.x, which has some breaking changes, so this is the path of least friction for us and perhaps others. Hopefully you agree.

aaron-skydio commented 1 year ago

Is it possible for your use case to install the version of fmt you want so it's findable by the find_package call there?

My main concern with this is that it prevents you from using an existing copy of fmt, e.g. if including SymForce in a larger project that uses a specific version of fmt

asa commented 1 year ago

We have solved this using an externally downloaded fmt 8.0.1 built as a package and spdlog 1.8.2. I offered this pr as a way to simplify the fmt + spdlog challenges by using the embedded fmt in spdlog. It seems like many projects are suffering from the odd coupling decisions in these libraries. You are correct that some may have their own version of external FMT, and so this may not be well suited for everyone.