-
Type:
Task
-
Resolution: Fixed
-
Priority:
Minor - P4
-
Affects Version/s: None
-
Component/s: None
-
None
-
Server Programmability
-
Fully Compatible
-
Programmability 2025-02-17
-
None
-
None
-
None
-
None
-
None
-
None
-
None
In SERVER-99192, a technique was developed to preserve the interface of assert_uti.h.
Through pragmas, we can prevent IWYU-based tools and IDE extensions from suggesting the inclusion of private detail headers into library user source files. These detail headers are largely redundant to include, and the fact that they are named at all is an abstraction break that makes maintenance refactoring of the library more challenging.
We don't plan to run IWYU anymore, but the include-cleaner clangd feature is another risk of the same nature.
https://clangd.llvm.org/guides/include-cleaner
It is not enabled by default, but some developers have been observed to use it.
This techinque must be applied to the unittest library as well.
Without these pragma hints in place, the include-cleaner will suggest private headers inside unittest.h instead of the interface header.
- is duplicated by
-
SERVER-79573 add IWYU export pragmas to unittest.h
-
- Closed
-
- is related to
-
SERVER-100640 remove redundant logv2/ header inclusions
-
- Closed
-
- related to
-
SERVER-99192 Make assert_util_core.h a private header
-
- Closed
-