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

fix: export headers with top-level Bazel targets #12762

Merged

Conversation

coryan
Copy link
Member

@coryan coryan commented Sep 29, 2023

Part of the work for #12760


This change is Reviewable

@coryan coryan temporarily deployed to internal September 29, 2023 01:27 — with GitHub Actions Inactive
@codecov
Copy link

codecov bot commented Sep 29, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (e68c72e) 93.59% compared to head (d97c9c2) 93.59%.
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #12762   +/-   ##
=======================================
  Coverage   93.59%   93.59%           
=======================================
  Files        2078     2078           
  Lines      182481   182481           
=======================================
  Hits       170786   170786           
  Misses      11695    11695           
Files Coverage Δ
generator/internal/scaffold_generator.cc 62.26% <ø> (ø)

... and 2 files with indirect coverage changes

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

@coryan coryan marked this pull request as ready for review September 29, 2023 02:23
@coryan coryan requested a review from a team as a code owner September 29, 2023 02:23
@@ -159,13 +189,15 @@ cc_library(
cc_library(
name = "mocks",
testonly = True,
hdrs = ["//google/cloud:mocks"],
Copy link
Member

Choose a reason for hiding this comment

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

image

Both are consistent. I am fine with your choice.

Copy link
Member Author

Choose a reason for hiding this comment

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

I just went with the most commonly used names. I figured we can change them later if we wanted to.

@@ -67,6 +67,12 @@ config_setting(
},
)

filegroup(
name = "common_hdrs",
srcs = [h for h in google_cloud_cpp_common_hdrs if not h.startswith("internal/")],
Copy link
Member

Choose a reason for hiding this comment

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

Observation: we are doing this internal filtering on handwritten libraries. Our fully generated libraries also have internal headers which are picked up by globs.

Do we care to filter both?

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. That is one of the reasons why this is "part of" and not "fixes" for that bug.

Copy link
Member Author

Choose a reason for hiding this comment

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

I included the fixes in this PR. PTAL

@@ -31,11 +31,13 @@ filegroup(
filegroup(
name = "hdrs",
srcs = glob([d + "*.h" for d in src_dirs]),
visibility = ["//:__pkg__"],
)
Copy link
Member

Choose a reason for hiding this comment

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

e.g.

filegroup(
    name = "public_hdrs",
    srcs = glob([d + "*.h" for d in service_dirs]),
    visibility = ["//:__pkg__"],
)

(Note the service_dirs instead of src_dirs)

Copy link
Member Author

Choose a reason for hiding this comment

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

Good idea, that may be handy in a follow up PR.

Copy link
Member Author

Choose a reason for hiding this comment

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

Included in this PR now.

@coryan coryan temporarily deployed to internal September 29, 2023 13:29 — with GitHub Actions Inactive
@coryan coryan merged commit b082b9a into googleapis:main Sep 29, 2023
54 checks passed
@coryan coryan deleted the fix-export-headers-with-top-level-Bazel-targets branch September 29, 2023 15:05
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.

None yet

2 participants