-
Notifications
You must be signed in to change notification settings - Fork 483
[BUILD] Remove WITH_ABSEIL
#3318
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
Conversation
✅ Deploy Preview for opentelemetry-cpp-api-docs canceled.
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3318 +/- ##
==========================================
- Coverage 89.56% 89.55% -0.01%
==========================================
Files 210 210
Lines 6502 6502
==========================================
- Hits 5823 5822 -1
- Misses 679 680 +1
🚀 New features to boost your workflow:
|
3049062
to
e639896
Compare
e639896
to
44d67d5
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.
The WITH_ABSEIL removal itself looks ok.
Not sure why the file opentelemetry-cpp-config.cmake.in was reformated.
Should we change the formatting scripts to ignore this file instead ?
…and Linux Fix different results of the same version of clang-format on Windows and Linux Fix different results of the same version of clang-format on Windows and Linux
44d67d5
to
45186aa
Compare
67f2c6c
to
2d35c25
Compare
Maybe the problem is the max length of cmake is default set to 80. I use |
In terms of stability and risk mitigation, there is:
I suspect there will be minor merge conflicts between the WITH_ABSEIL removal and the CMake COMPONENTS refactoring, so this raise the question in which order to merge (for one, the cmake.in template has moved) @owent Can this PR wait after the opentelemetry-cpp 1.20 release, so we merge all cmake changes at once ? @dbarker FYI |
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 cleanup.
I'm okay merging this before the components pr and working through the conflicts, they should be manageable. |
find_package(absl CONFIG REQUIRED) | ||
endif() | ||
if(WITH_OTLP_GRPC) | ||
find_package(absl CONFIG REQUIRED) |
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.
Why is absl only required for WITH_OTLP_GRPC
, not for all cases?
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.
otel-cpp's API no longer depends on abseil-cpp's headers, eliminating path conflicts between internal and external versions of abseil-cpp.
Some components use protobuf, which may include abseil-cpp headers with overlapping paths from the internal version. This necessitates abseil-cpp when using a newer version of protobuf.
The protobuf package file automatically calls find_package(absl CONFIG REQUIRED)
and imports it when needed. However, some gRPC versions do not import abseil-cpp, so it only needs to be imported when working with gRPC.
OK, this is a small PR and it can be merged last, I will resolve the conflicts when the time comes. |
All, there is more to this, as it just turned out. Ubuntu 20.04 is being removed in 3 days, so we MUST upgrade ci as we are still using it. When upgrading CI, the abseil builds now fails, even when the abseil version used is the same. From a quick look, this sounds due to a compiler version change (gcc 9 to 11), confusing the abseil code to think it can use std::in_place_t, which is a C++17 construct. It seems the abseil code does not honor the fact we build in C++14 then, and assumes std::in_place_t is ok to use. Long story short:
@open-telemetry/cpp-approvers @dbarker Any thoughts ? |
@marcalff The main risk I see of removing Setting Potential issues that may be uncovered:
Adding a simple cmake install test based on vcpkg installed dependencies, and a conditional in the opentelemetry-cpp-config.cmake on the protobuf version to use the correct cmake search mode could mitigate the risk. That said, I'd lean towards releasing this and #3220 together due to the test coverage added. Would disabling the 20.04 ci runners before the 3 days, then create the release without this PR, and work on the ci upgrade post release work? |
As @dbarker mentioned, I agree on merging this after the release if it could break vcpkg port in potential. |
I've added a comment here #3330 (comment). I'm optimistic that the ci upgrade can proceed by adding the CXX_STANDARD=14 env var to the failing jobs. |
Yes, this is the safest path I think. |
Do not merge (now) tag: To merge after opentelemetry-cpp 1.20 is released |
Fixes #3116
Maybe also fixes #3309
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