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

refactor(cmake): asset uses library helper #12433

Merged
merged 2 commits into from
Aug 21, 2023

Conversation

dbolduc
Copy link
Member

@dbolduc dbolduc commented Aug 21, 2023

Part of the work for #12428

asset is a weird one. We always compile that orgpolicy proto. Note that it is just messages. So it is not a huge deal, and I don't expect us to treat it any differently in light of #8022


This change is Reviewable

@dbolduc dbolduc temporarily deployed to internal August 21, 2023 17:01 — with GitHub Actions Inactive
@codecov
Copy link

codecov bot commented Aug 21, 2023

Codecov Report

Patch coverage has no change and project coverage change: -0.01% ⚠️

Comparison is base (4a963e2) 93.63% compared to head (df196be) 93.62%.
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #12433      +/-   ##
==========================================
- Coverage   93.63%   93.62%   -0.01%     
==========================================
  Files        2035     2035              
  Lines      180223   180223              
==========================================
- Hits       168743   168740       -3     
- Misses      11480    11483       +3     

see 4 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dbolduc dbolduc marked this pull request as ready for review August 21, 2023 18:00
@dbolduc dbolduc requested a review from a team as a code owner August 21, 2023 18:00
@@ -22,6 +22,11 @@
# * GOOGLE_CLOUD_CPP_SERVICE_DIRS: a list of service directories within the
# library.
#
# The following conditional arguments can be supplied to handle edge cases:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this be an argument via cmake_parse_arguments()?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. Done.

This was a bit tricky to document. Hopefully it is clear.

Note that I am still setting DOXYGEN_EXTRA_INCLUDES in the parent scope. I do not intend to add that as an argument or document it in the helper function.

@dbolduc dbolduc temporarily deployed to internal August 21, 2023 18:57 — with GitHub Actions Inactive
@@ -19,10 +19,21 @@
# * library: the short name of the library, e.g. `kms`.
# * display_name: the display name of the library, e.g. "Cloud Key Management
# Service (KMS) API"
#
# Additionally, we must set the following **variable** in the parent scope. We
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For a separate PR, maybe we should have a SERVICE_DIRS list parameter and a boolean parameter that adds "" to it, something like WITH_LOCAL_SERVICE_DIR or WITH_FORWARDING_HEADERS

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eh. I think that would add unnecessary complexity. What we have works and I am not trying to get cmake readability.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Passing values through global variables in CMake is bad for the same reason that passing values in global variables is bad in all languages. This is not a good habit to get into.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack.

@dbolduc dbolduc merged commit 044b8db into googleapis:main Aug 21, 2023
52 checks passed
@dbolduc dbolduc deleted the refactor-asset-cmake branch August 21, 2023 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants