Make header files sortable.
Is your feature request related to a problem? Please describe.
H5ES won't compile if SortIncludes: true in .clang-format.
CC H5ES.lo
In file included from H5ESdevelop.h:22,
from H5ESprivate.h:28,
from H5ESpkg.h:29,
from H5ES.c:37:
H5ESpublic.h:94:5: error: unknown type name ‘hid_t’
94 | hid_t err_stack_id; /**< ID for error stack from failed operation */
| ^~~~~
H5ESpublic.h:131:43: error: unknown type name ‘hid_t’; did you mean ‘id_t’?
131 | hid_t err_stack, void *ctx);
| ^~~~~
| id_t
H5ESpublic.h:158:8: error: unknown type name ‘hid_t’; did you mean ‘id_t’?
158 | H5_DLL hid_t H5EScreate(void);
| ^~~~~
| id_t
Describe the solution you'd like
Make headers sortable by clang formatter.
This probably won't be fixed for a little while since it's low priority, but the fundamental problem is that we have a LOT of problems with fragile typedef ordering. I have some potential fixes in mind, but they'll take a little while to implement and we'll have to discuss it in an engineering meeting.
Nice try but not enough.
Compiling src/H5FDonion_*.c will fail. Compiling test/h5test.c will fail.
Please test with SortIncludes: true in.clang-format.
I will leave it open until all headers are truly independent and sortable.