[SERVER-7504] Core Server Headers should not include basic.h Created: 29/Oct/12  Updated: 30/Aug/23  Resolved: 29/Aug/23

Status: Closed
Project: Core Server
Component/s: Internal Client, Internal Code
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Andy Schwerin Assignee: [DO NOT ASSIGN] Backlog - Server Development Platform Team (SDP) (Inactive)
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to CXX-94 C++ Client driver headers dependency ... Closed
related to SERVER-24038 Linter should check that cpp files in... Closed
Assigned Teams:
Server Development Platform
Participants:

 Description   

Per style guide, only cpp file should include these, to avoid leaking unwanted using declarations, includes and macros to client code.



 Comments   
Comment by Andy Schwerin [ 30/Aug/23 ]

Response posted in SERVER-24038. It's probably fine to just leave both these tickets closed as you've done, though alex.neben@mongodb.com.

Comment by Alex Neben [ 29/Aug/23 ]

This is in the opposite of SERVER-24038. I am going to close both tickets. mathias@mongodb.com and schwerin@mongodb.com can you two come to an agreement and reopen one of these?

Comment by Eric Milkie [ 23/Nov/16 ]

We still have quite a few headers that include basic.h, but they aren't necessarily "core".

Comment by Tad Marshall [ 29/Oct/12 ]

We should talk about this ... there is a certain beauty in keeping headers
as little self-contained units of declaration, which they can only do if
there is no assumption that the caller has included something previously.
This seems like a step backwards to me. Not impossible, just very likely
clumsy and inelegant. I also don't fully understand the motivation.

pch.h is junk, I'm happy to see it kicked out of headers. <windows.h> is
the owner of lots of vital stuff and is not junk (just big).

This also requires changes to the rules for include files. Some cpp files
will need to include mongo/platform/basic.h before including their own
header file.

Generated at Thu Feb 08 03:14:44 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.