-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Fully Compatible
-
Service Arch 2022-05-16
-
0
SERVER-52604 links to a python script that will move all definitions of MONGO_LOGV2_DEFAULT_COMPONENT below the conventional block of includes a the top of .cpp files. After SERVER-52604, this is possible.
Doing this makes it possible for headers to define (and then undef) the macro internally without worrying that another file has already defined it. This could be accomplished with nonstandard push_macro/pop_macro but that's complicated and nonstandard. We can do better.
Doing this also makes a cleaner precompiled header / modules / caching model because headers will not be included multiple times with different values of MONGO_LOGV2_DEFAULT_COMPONENT. It mitigates one definition rule risk by the same logic.
[split from SERVER-52604]
I'm just running a script I already had from last year.
There are some cases where a file needed manual intervention. Not many.
- is depended on by
-
SERVER-66202 MONGO_LOGV2_DEFAULT_COMPONENT conventions lint check
- Closed
- related to
-
SERVER-71926 create linter rule for MONGO_LOGV2_DEFAULT_COMPONENT placement
- Closed
-
SERVER-71925 move MONGO_LOGV2_DEFAULT_COMPONENT below includes (wiredtiger_c_api_test.cpp)
- Closed
- split from
-
SERVER-52604 Log from anywhere (normalize MONGO_LOGV2_DEFAULT_COMPONENT)
- Closed