[CXX-2367] Review #include hygiene in header files Created: 10/Sep/21  Updated: 07/Feb/24

Status: Backlog
Project: C++ Driver
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor - P4
Reporter: Ezra Chung Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by CXX-2102 Remove unused and add missing includes Closed
Epic Link: CXX usability improvements

 Description   

There are some undesirable maintainability concerns that #include may discreetly facilitate such as:

  1. Violation of "Include What You Use"
  2. "Elephant on a Flea"

Components (header + source) in the C driver, particularly those containing public user-facing interfaces, should be reviewed to ensure that none of the conditions above are present:

  1. Ensure header files include what they use such that a given header file may be #include-ed in an otherwise empty source file without error. Header files deliberately designed to work in this manner are necessarily exempt from this rule.
  2. Ensure header files for small components (flea) do not transitively include large dependencies (elephant). Instances should be evaluated to see if inclusions can be moved into a corresponding source file.

Generated at Wed Feb 07 22:05:42 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.