open-telemetry / opentelemetry-cpp

The OpenTelemetry C++ Client
https://opentelemetry.io/
Apache License 2.0
817 stars 392 forks source link

[BUILD] Add support for bzlmod #2608

Closed keith closed 3 weeks ago

keith commented 3 months ago

This adds support for bzlmod, which is bazel's new dependency resolution system.

Theoretically we could now remove the previous dependency management configuration which required flattening all the dependencies, but I left it here for now for users using old versions of bazel.

Fixes: https://github.com/open-telemetry/opentelemetry-cpp/issues/2334

keith commented 3 months ago

this will probably fail CI with the same issue as https://github.com/open-telemetry/opentelemetry-cpp/pull/2599

keith commented 2 months ago

ok I pushed an update here that seems to fix it at least with c++17, it depends on https://github.com/bazelbuild/bazel-central-registry/pull/1810

marcalff commented 2 months ago

Hi @keith

Could you merge with a recent main to resolve conflicts, and investigate the remaining CI failures for bazel if any ?

Thanks, -- Marc

keith commented 2 months ago

The windows and asan failures here are real.

keith commented 1 month ago

hopefully will be unblocked by https://github.com/open-telemetry/opentelemetry-cpp/pull/2679

marcalff commented 3 weeks ago

@keith

Now that #2679 is merged, could you update this PR and resolve conflicts ?

Looking to include this in the upcoming release.

Thanks.

keith commented 3 weeks ago

I think there might still be a grpc ODR issue I have to fix, but we'll see if CI fails

codecov[bot] commented 3 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 87.67%. Comparing base (497eaf4) to head (44f193b). Report is 79 commits behind head on main.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/open-telemetry/opentelemetry-cpp/pull/2608/graphs/tree.svg?width=650&height=150&src=pr&token=FJESTYQ2AD&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry)](https://app.codecov.io/gh/open-telemetry/opentelemetry-cpp/pull/2608?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry) ```diff @@ Coverage Diff @@ ## main #2608 +/- ## ========================================== + Coverage 87.12% 87.67% +0.55% ========================================== Files 200 190 -10 Lines 6109 5851 -258 ========================================== - Hits 5322 5129 -193 + Misses 787 722 -65 ``` [see 79 files with indirect coverage changes](https://app.codecov.io/gh/open-telemetry/opentelemetry-cpp/pull/2608/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry)
keith commented 3 weeks ago

thanks!