-
Notifications
You must be signed in to change notification settings - Fork 432
fix(cmake): do not disable feature if option GOOGLE_CLOUD_CPP_ENABLE_* does not exist
#15820
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
base: main
Are you sure you want to change the base?
Conversation
Summary of ChangesHello @GaetanLepage, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request resolves a bug in the CMake build system's feature management, specifically within the Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Code Review
This pull request addresses a bug in the CMake build logic where a feature could be incorrectly disabled. The issue arose when a legacy GOOGLE_CLOUD_CPP_ENABLE_<feature> option was not defined, as this was treated as a 'false' value, leading to the feature being filtered out. The fix introduces a check to verify that the legacy option is defined before its value is evaluated. This change is correct and makes the build configuration more robust by preventing features from being unintentionally disabled.
GOOGLE_CLOUD_CPP_ENABLE_* does not exist
|
/gcbrun |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #15820 +/- ##
==========================================
- Coverage 92.95% 92.94% -0.01%
==========================================
Files 2458 2458
Lines 227589 227589
==========================================
- Hits 211547 211537 -10
- Misses 16042 16052 +10 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
GOOGLE_CLOUD_CPP_ENABLEfeatures which do not have a correspondingGOOGLE_CPP_CPP_ENABLE_<name>feature are getting filtered out wrongfully.Indeed,
google_cloud_cpp_enable_cleanupwill disable a feature whenNOT "${${feature_flag}}".This statement will be
truein two cases:GOOGLE_CPP_CPP_ENABLE_<name>is explicitly disabled (which is the intended behavior)GOOGLE_CPP_CPP_ENABLE_<name>does not exist (unintended)Indeed, this leads to
universe_domainbeing filtered out asGOOGLE_CPP_CPP_ENABLE_UNIVERSE_DOMAINwas not declared ingoogle_cloud_cpp_define_legacy_feature_options.This PR fixes the
google_cloud_cpp_enable_cleanupbehavior by disabling a feature when bothDEFINED "${${feature_flag}}"andNOT "${${feature_flag}}".Another alternative would be to declare
GOOGLE_CPP_CPP_ENABLE_UNIVERSE_DOMAIN, but I understood that these options were "legacy" and that their usage is discouraged.