-
Notifications
You must be signed in to change notification settings - Fork 417
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
Fix #724 #725
Fix #724 #725
Conversation
Codecov Report
@@ Coverage Diff @@
## main #725 +/- ##
=======================================
Coverage 94.75% 94.75%
=======================================
Files 217 217
Lines 9923 9923
=======================================
Hits 9403 9403
Misses 520 520
|
@@ -3,6 +3,9 @@ include_directories(${CMAKE_SOURCE_DIR}/ext/include) | |||
|
|||
add_library(opentelemetry_exporter_elasticsearch_logs src/es_log_exporter.cc) | |||
|
|||
target_link_libraries(opentelemetry_exporter_elasticsearch_logs |
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.
Seems this change is only for MinGW, is it needed for other toolchains?
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.
It builds with msvc already, so I assume it's unique to MinGW?
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.
Seems this change is only for MinGW, is it needed for other toolchains?
Yes. Some test targets use target_link_libraries
to link additional dependencies which are also depended by exporters. I think the depended targets should be added automatically by linking the exporters, and users should not concern these targets unless they use these targets directly.
These PR mainly remove the linking targets from test targets and add these targets into the exporters.
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.
It builds with msvc already, so I assume it's unique to MinGW?
I create a script toolset to build opentelemetry-cpp and here is the output when using MinGW64 https://github.com/atframework/cmake-toolset/runs/2492797467 .I'm trying to build all the dependencies myself or use my vcpkg instead of opentelemetry-cpp/tools/vcpkg
to build opentelemetry-cpp .
75f60a4
to
6344d37
Compare
Don't know why coverage descrease. This PR has not change |
@@ -2,6 +2,19 @@ | |||
#include "opentelemetry/version.h" | |||
|
|||
#if defined(HAVE_ABSEIL) | |||
|
|||
# if defined(__GNUC__) || defined(__GNUG__) |
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.
I am sorry for adding void __cdecl ThrowBadVariantAccess()
. What you are doing here seems reasonable.
You can ignore this as it is not related to PR. The coverage issue has occurred multiple times and needs to be looked at separately. |
Is there a way to add MinGW in the CI? |
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.
Is there a way to add MinGW in the CI?
Github hosted runner has mingw toolchain. Maybe we can use C:/msys64/msys2_shell.cmd -mingw64 -defterm -no-start -here -lc "ci/do_ci.sh cmake.test"
to build on MinGW(e.g. https://github.com/atframework/cmake-toolset/blob/main/.github/workflows/build.yaml#L98), but I didn't test it.
@@ -3,6 +3,9 @@ include_directories(${CMAKE_SOURCE_DIR}/ext/include) | |||
|
|||
add_library(opentelemetry_exporter_elasticsearch_logs src/es_log_exporter.cc) | |||
|
|||
target_link_libraries(opentelemetry_exporter_elasticsearch_logs |
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.
Seems this change is only for MinGW, is it needed for other toolchains?
Yes. Some test targets use target_link_libraries
to link additional dependencies which are also depended by exporters. I think the depended targets should be added automatically by linking the exporters, and users should not concern these targets unless they use these targets directly.
These PR mainly remove the linking targets from test targets and add these targets into the exporters.
@@ -3,6 +3,9 @@ include_directories(${CMAKE_SOURCE_DIR}/ext/include) | |||
|
|||
add_library(opentelemetry_exporter_elasticsearch_logs src/es_log_exporter.cc) | |||
|
|||
target_link_libraries(opentelemetry_exporter_elasticsearch_logs |
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.
It builds with msvc already, so I assume it's unique to MinGW?
I create a script toolset to build opentelemetry-cpp and here is the output when using MinGW64 https://github.com/atframework/cmake-toolset/runs/2492797467 .I'm trying to build all the dependencies myself or use my vcpkg instead of opentelemetry-cpp/tools/vcpkg
to build opentelemetry-cpp .
@owent - Can you update the branch with base, that will allows us to merge the PR |
Signed-off-by: owent <admin@owent.net>
6344d37
to
2f70ae2
Compare
Signed-off-by: owent admin@owent.net
Fixes #724
Changes
Please provide a brief description of the changes here.
For significant contributions please make sure you have completed the following items:
CHANGELOG.md
updated for non-trivial changes