-
Notifications
You must be signed in to change notification settings - Fork 440
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUILD] SDK Header files cleanup, use forward declarations #2182
[BUILD] SDK Header files cleanup, use forward declarations #2182
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #2182 +/- ##
==========================================
+ Coverage 87.50% 87.53% +0.03%
==========================================
Files 169 169
Lines 4887 4888 +1
==========================================
+ Hits 4276 4278 +2
+ Misses 611 610 -1
|
226ae43
to
2cbbb31
Compare
@cngzhnp Just curious, how are you finding out these indirect header includes ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed all 172 files changed.
LGTM, thanks for the cleanup.
Sorry for the late response @lalitb, actually I was doing manually which means it is not perfect. However I could share my following steps like below:
This could be done by using IWYU as well btw. |
35d0ba3
to
53b5d01
Compare
6079410
to
bbe9ddf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
thanks :)
nit: Jaeger exporter will be removed. no need to have changes there.
# include "opentelemetry/sdk/logs/processor.h" | ||
# include "opentelemetry/nostd/string_view.h" | ||
# include "opentelemetry/sdk/resource/resource.h" | ||
# include "opentelemetry/version.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit - This file has reference to KeyValueIterable
, - seems it is indirectly included. Not a blocker, we can fix this separately.
@@ -20,6 +19,8 @@ namespace sdk | |||
{ | |||
namespace logs | |||
{ | |||
class LogRecordProcessor; | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file has reference to opentelemetry::common::SystemTimestamp
- seems to be indirectly included. Not a blocker, but can be fixed separately.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good find.
I think we should automate this with include-what-you-use, because doing manual reviews checking all dependencies gets too tedious and error prone.
Fixes #2043
Changes
Clean up header files in SDK folder to use as much as possible forward declarations.
For significant contributions please make sure you have completed the following items:
CHANGELOG.md
updated for non-trivial changes