Skip to content

Commit

Permalink
Tentative fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
marcalff committed Mar 26, 2024
1 parent 3940253 commit 68549f0
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 34 deletions.
21 changes: 0 additions & 21 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -565,27 +565,6 @@ jobs:
- name: run tests
run: ./ci/do_ci.sh bazel.with_async_export.test

bazel_with_abseil:
name: Bazel with external abseil
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Mount Bazel Cache
uses: actions/cache@v4
env:
cache-name: bazel_cache
with:
path: /home/runner/.cache/bazel
key: bazel_test
- name: setup
run: |
sudo ./ci/setup_ci_environment.sh
sudo ./ci/install_bazelisk.sh
- name: run tests
run: ./ci/do_ci.sh bazel.with_abseil

bazel_valgrind:
name: Bazel valgrind
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion api/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ cc_library(
"@com_google_absl//absl/base",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/types:variant",
],
],
)

[config_setting(
Expand Down
10 changes: 8 additions & 2 deletions api/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,14 @@ if(WITH_ABSEIL)
target_link_libraries(
opentelemetry_api INTERFACE absl::bad_variant_access absl::any absl::base
absl::bits absl::city)
list(APPEND TARGET_DEPS "absl_bad_variant_access" "absl_any" "absl_base"
"absl_bits" "absl_city")
list(
APPEND
TARGET_DEPS
"absl_bad_variant_access"
"absl_any"
"absl_base"
"absl_bits"
"absl_city")
endif()

if(WITH_STL STREQUAL "OFF")
Expand Down
4 changes: 0 additions & 4 deletions ci/do_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -403,10 +403,6 @@ elif [[ "$1" == "cmake.install.test" ]]; then
make -j $(nproc)
sudo make install
exit 0
elif [[ "$1" == "bazel.with_abseil" ]]; then
bazel $BAZEL_STARTUP_OPTIONS build $BAZEL_OPTIONS_ASYNC --//api:with_abseil=true //...
bazel $BAZEL_STARTUP_OPTIONS test $BAZEL_TEST_OPTIONS_ASYNC --//api:with_abseil=true //...
exit 0
elif [[ "$1" == "cmake.test_example_plugin" ]]; then
# Build the plugin
cd "${BUILD_DIR}"
Expand Down
6 changes: 2 additions & 4 deletions docs/dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,8 @@ Both these dependencies are listed here:
`OPENTELEMETRY_OPTION_USE_STD_SPAN=0` to indicate nostd:span will always
not be a alias for std::span.
- Uses Abseil C++ Library for `absl::variant` as default `nostd::variant` if
`WITH_ABSEIL` cmake option or
`--@io_opentelemetry_cpp//api:with_abseil=true` (aka
`--//api:with_abseil=true`) bazel option is enabled. License: `Apache
License 2.0`
using cmake option `WITH_ABSEIL`, or if using bazel.
License: `Apache License 2.0`

- [OTLP/HTTP+JSON](/exporters/otlp)
exporter:
Expand Down
3 changes: 1 addition & 2 deletions examples/otlp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@ gRPC internally uses a different version of Abseil than OpenTelemetry C++ SDK.
One option to optimize your code is to build the SDK with system-provided
Abseil library. If you are using CMake, then `-DWITH_ABSEIL=ON` may be passed
during the build of SDK to reuse the same Abseil library as gRPC. If you are
using Bazel, then `--@io_opentelemetry_cpp/api:with_abseil=true` may be passed
to reuse your Abseil library in your project.
using Bazel, the build already depends on an Abseil library in your project.

If you do not want to pursue the above option, and in case if you run into
conflict between Abseil library and OpenTelemetry C++ `absl::variant`
Expand Down

0 comments on commit 68549f0

Please sign in to comment.