-
Notifications
You must be signed in to change notification settings - Fork 438
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] Fix exported definitions when building DLL with STL #2387
Conversation
Signed-off-by: Harish Shan <[email protected]>
Signed-off-by: Harish Shan <[email protected]>
Codecov Report
@@ Coverage Diff @@
## main #2387 +/- ##
=======================================
Coverage 87.43% 87.43%
=======================================
Files 199 199
Lines 6030 6030
=======================================
Hits 5272 5272
Misses 758 758
|
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.
Thanks for the analysis and fix, see comments.
Signed-off-by: Harish Shan <[email protected]>
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 for the fix.
Waiting for approval from @ThomsonTan who owns this area.
I think it is better to change the MeterSelector (and so also MeterSelectorFactory) to take Edit - Same for InstrumentSelector. |
Thanks @lalitb Agreed, this is a much better solution. |
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.
Per @lalitb findings, opentelemetry-cpp needs to cleanup the SDK exposed interface instead, to not use nostd::string_view.
…d of nostd::string_view Signed-off-by: Harish Shan <[email protected]>
541c9d6
to
1f9ac98
Compare
Signed-off-by: Harish Shan <[email protected]>
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.
Excellent, thanks for revising the patch.
Please add a section in the CHANGELOG, for breaking changes,
listing the APIs affected by the change to const std::string&
.
@@ -5,7 +5,6 @@ | |||
|
|||
#include <memory> |
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.
Do we need the string
header as well ?
Same for every header file touched.
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.
Thanks. LGTM once the string header is included in modified header files.
Signed-off-by: Harish Shan <[email protected]>
Signed-off-by: Harish Shan <[email protected]>
Partially Fixes #2202
Changes
The function definitions for MeterSelectorFactory::Create and InstrumentSelectorFactory::Create are different for the nostd and stl builds, which causes linker errors when trying to build the DLL.
Cmake build WITH_STL=OFF:
CMake build WITH_STL=ON:
Introduced a compile definition
OPENTELEMETRY_STL_VERSION
to the DLL build process to export the correct definitions.For significant contributions please make sure you have completed the following items:
CHANGELOG.md
updated for non-trivial changes