refactor: drop direct dependency on Boost.Serialization - #534
Conversation
|
Boost dependency footprint vs Header-inclusion weights (graph files pulling each direct dependency in):
Transitive Boost modules: 68 → 68 (0) |
|
Compiler-warning counts vs
|
efeaf15 to
d707f46
Compare
d707f46 to
cb986e5
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! 🚀 New features to boost your workflow:
|
|
I like the design behind Boost.Core.Serialization in that it's providing just enough for client libraries like Graph to define helper functions for proper Serialization should the user actually want to use it. |
jeremy-murphy
left a comment
There was a problem hiding this comment.
After you merge this, please update the review for removing Spirit so that, I assume, the stats with the delta will update.
Remove dependency to Boost.Serialization
Before submitting
developbranch.Type of change
Does this PR introduce a breaking change?
What this PR does
nvputilities to boost.core.serializationMotivation
Boost.Serialization is one of the heaviest Boost.Library along with Spirit: 22 direct dependencies, 55 total, effectively dragging most of Boost in default build: https://alandefreitas.github.io/boostdep_graph/libs/serialization.html
In contrast, Boost.Core.Serialization has 3 dependencies: https://alandefreitas.github.io/boostdep_graph/libs/core.html
We switch to Boost.Core.Serialization dependencies and use a forward declaration trick inspired by Peter Dimov uuid trick to remove direct coupling on Boost.Serialization (the user who needs Serialization will pull its headers anyway): https://github.com/boostorg/uuid/blob/2aa25a3afe023c5324d1b13015a65f67bfaef08c/include/boost/uuid/uuid.hpp#L344-L357
Some Serialization stuff for property map is behind an MPI guard: this is actually Boost.Parallel territory, and looks like a remnant of modularization BGL/PBGL. This should be exported to PBGL rather than polluting BGL, but it's a cross-repo PR and outside of the current scope.
Testing
The current test is unchanged, we just add a static assertion to verify the tracking level is unchanged (it exists to guarantee that non-const graphs can be serialized, removing it would cause a compilation error deep inside Serialization if the user tries to serialize a non-const graph).
Checklist
b2in thetest/directory).