Bitcoin full node and query server

Mar 10, 2022

View in context in the libbitcoin Slack #general mirror.

pmienk21:48
Looked good but for the ordering of headers. It's fighting with the generated stuff and interspersing libbitcoin and dependency headers. my understanding was internal header references came last. as for directories, the ordering appears opposite to the generation ordering
3 replies · jungly · last Mar 11, 2022
jungly14:45
The includes sorting was going to get too complex. For now, I decided to ask clang-formatter to don't try and sort includes
jungly14:46
The system/internal sorting was easy. The sort order for directories would require too much configuration in .clang-format, and I decided it wasn't worth the effort. We want this:
#include <bitcoin/system/constants.hpp>
#include <bitcoin/system/constraints.hpp>
#include <bitcoin/system/chain/block.hpp>
#include <bitcoin/system/chain/chain.hpp>
But .clang-format would do the following because chain comes before constants.
#include <bitcoin/system/chain/block.hpp>
#include <bitcoin/system/chain/chain.hpp>
#include <bitcoin/system/constants.hpp>
#include <bitcoin/system/constraints.hpp>
We can make it work, but we'd have to paste tonnes of directory paths into .clang-format and give them priorities. It'll just be another shit to maintain. We just trust our eyeballs sorting for now.
(edited)