Skip to content
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

Specify OPENTELEMETRY_ABI_VERSION_NO with Bazel #3019

Closed
BYVoid opened this issue Aug 6, 2024 · 2 comments · Fixed by #3020
Closed

Specify OPENTELEMETRY_ABI_VERSION_NO with Bazel #3019

BYVoid opened this issue Aug 6, 2024 · 2 comments · Fixed by #3020
Labels
bug Something isn't working triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@BYVoid
Copy link
Contributor

BYVoid commented Aug 6, 2024

Is your feature request related to a problem?
OPENTELEMETRY_ABI_VERSION_NO is by default 1 in Bazel, and there is no where to configure it, unlike CMake (WITH_ABI_VERSION_2).

Describe the solution you'd like
Consider adding a Bazel flag to allow changing OPENTELEMETRY_ABI_VERSION_NO as in https://github.com/open-telemetry/opentelemetry-cpp/blob/main/api/BUILD.

Describe alternatives you've considered
I tried to patch the Bazel build files.

@github-actions github-actions bot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Aug 6, 2024
@marcalff marcalff added bug Something isn't working triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Aug 6, 2024
@BYVoid
Copy link
Contributor Author

BYVoid commented Aug 6, 2024

Thanks for merging.

Would you consider setting the default abi_version_no to 2 in Bazel? As Bazel is hermetic (all deps are built from source), there is no ABI compatibility issue at all. It makes sense to allow users to use the latest APIs guarded by #if OPENTELEMETRY_ABI_VERSION_NO >=2 by default.

If this makes sense, I am happy to create another pull request.

@marcalff
Copy link
Member

marcalff commented Aug 6, 2024

Moving to OPENTELEMETRY_ABI_VERSION_NO = 2 will cause breaking changes.

For example, see how parameters for opentelemetry::trace::TracerProvider::GetTracer() changed.

Users should be asking explicitly for abi 2 instead if they want to use it, we can not ship it by default for now.

Beside, ABI v2 can change without notice with more breaking changes, it is not stable yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants