-
Notifications
You must be signed in to change notification settings - Fork 438
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 version major/minor/patch macros #2014
Conversation
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 PR :)
@@ -8,6 +8,10 @@ | |||
|
|||
#define OPENTELEMETRY_ABI_VERSION_NO 1 | |||
#define OPENTELEMETRY_VERSION "1.8.2" |
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.
Use # operator for preprocessor to define OPENTELEMETRY_VERSION with the new VERSION macros?
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.
Technically possible, but the resulting code, with OPENTELEMETRY_CONCAT()
and OPENTELEMETRY_STRINGIFY()
, will be extremely obfuscated.
There is no risk that the string version goes out of sync with major/minor/patch versions, there is a unit test to catch this.
Fixes #2012
Changes
Added the following macros:
This is helpful for user code, to support multiple versions in case of incompatible changes.
For significant contributions please make sure you have completed the following items:
CHANGELOG.md
updated for non-trivial changes