-
Notifications
You must be signed in to change notification settings - Fork 440
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
Provide major/minor/patch version macros #2012
Comments
@wjones127 - Is This get's updated for every release. |
I don't think Though if we do some work in CMake, we might be able to extract these ourselves. |
Nevermind, we don't have access to the version at configure time. |
Yes it would be difficult to tokenize OPENTELEMETRY_SDK_VERSION macro.
|
To clarify, opentelemetry-cpp should provide versions for API and SDK, like this:
so that client code can adapt when incompatible changes are done in the API (for example, semantic conventions, links in spans currently under discussion) or in the SDK (for example, options for exporters) |
Having separate versions for API and SDK would introduce more confusion, as we have single release version containing both of them. We can instead have one of above set of macros(say)
And the the guidelines for changing the version (as done now):
|
Agreed, this is sufficient because API and SDK are shipped together. Implemented, please see PR. |
Is your feature request related to a problem?
In Apache Arrow Flight C++, we'd like to support a wide range of versions of opentelemetry-cpp. Sometimes there are breaking changes in the API, such as in #1761. It's cool that there are breaking changes (I appreciate the pace at which the project is evolving), except that in our project we don't have a way to check the version and easily adapt our code to support versions both before and after the change.
Describe the solution you'd like
It's common in many C++ projects to provide macros for:
OPENTELEMETRY_VERSION_MAJOR
OPENTELEMETRY_VERSION_MINOR
OPENTELEMETRY_VERSION_PATCH
Then, downstream libraries can write code like:
Would you be open to providing these?
Describe alternatives you've considered
We could use CMake try_compile feature to detect what APIs are available at compile time, but that's quite burdensome to maintain.
The text was updated successfully, but these errors were encountered: