-
Notifications
You must be signed in to change notification settings - Fork 483
[BUILD] Fix compilation with Regex being disabled #3276
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
Conversation
* It was missing an include for std::any_of * Avoid declaring unused constants (at least my LLVM errors out)
✅ Deploy Preview for opentelemetry-cpp-api-docs canceled.
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3276 +/- ##
=======================================
Coverage 87.96% 87.96%
=======================================
Files 205 205
Lines 6407 6407
=======================================
Hits 5635 5635
Misses 772 772
|
@@ -1,6 +1,9 @@ | |||
// Copyright The OpenTelemetry Authors | |||
// SPDX-License-Identifier: Apache-2.0 | |||
|
|||
#if OPENTELEMETRY_HAVE_WORKING_REGEX |
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.
The CI is failing for this - you need to include instrument_metadata_validator.h
before using this macro. The changes look good otherwise.
Yes, this was previously tested with GCC 4.8, but it was removed from CI after C++11 support was dropped. |
Thanks for the comment. I've moved where the check is, into the else of the existing part. |
Does this mean... we should just drop support for this? As in, is the condition it is disabled in ever hit? Perhaps just by people like me that disable it. Note that I do it just to save compilation time (a la #2431). |
I prefer to keep the old implementation because we have some old toolchains in some peoduct environment.I can maintain this toolchain but don't want to have a large patch file. |
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, and thanks.
Changes
Fix compilation with Regex disabled:
Testing
I compiled it locally, and it works - but I assume either not-regex isn't covered by testing, our my use of LLVM 19 in my own code base means it was being more strict.