-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Server Programmability
I just noticed a test (itoa_test.cpp in this case) was modified from its include of
#include "mongo/unittest/unittest.h"
to now use the granular includes of the components of the unittest library:
#include "mongo/unittest/assert.h"
#include "mongo/unittest/framework.h"
This is a downgrade, as the unittest.h header is designed as an umbrella header for the API.
These smaller more granular headers are basically implementation details designed to break dependency cycles when necessary.
But unit tests without special dependency considerations should be using the unittest/unittest.h header and not the subcomponents.
The unit tests affected by this migration should have their includes of unittest/unittest.h restored.
There's an IWYU pragma that can be added to unittest.h to prevent future IWYU passes from doing this again.
We'd make unittest/unittest.h look like this:
#pragma once // IWYU pragma: begin_exports #include "mongo/unittest/assert.h" #include "mongo/unittest/assert_that.h" #include "mongo/unittest/bson_test_util.h" #include "mongo/unittest/framework.h" // IWYU pragma: end_exports
- is caused by
-
SERVER-77049 IWYU auto changes for compiledb 0.8 - 0.9
- Closed