Skip to content

doc: updates to library generation guide - #16305

Open
scotthart wants to merge 1 commit into
googleapis:mainfrom
scotthart:doc_library_gen
Open

doc: updates to library generation guide#16305
scotthart wants to merge 1 commit into
googleapis:mainfrom
scotthart:doc_library_gen

Conversation

@scotthart

Copy link
Copy Markdown
Member

No description provided.

@scotthart
scotthart requested a review from a team as a code owner July 31, 2026 17:01

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

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 updates the contributor guide for adding generated libraries by simplifying the instructions on updating the googleapis SHA and refining the shell command used to find .proto files. The review feedback points out that the sed pattern in the updated shell command fails to match the directory path containing a + character, and suggests a robust regex pattern to handle both Bzlmod and legacy workspace layouts.

```shell
find "${bazel_output_base}/external/googleapis+/${subdir}" -name '*.proto' -print0 |
xargs -0 grep -l '^service'
xargs -0 grep -l '^service' | sed 's|.*/external/googleapis/||' | sort

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The sed pattern .*/external/googleapis/ will not match the paths generated by the find command because the directory name contains a + (i.e., external/googleapis+). As a result, the prefix will not be stripped.

Using googleapis[^/]*/ instead will robustly handle both Bzlmod (googleapis+ or googleapis~) and legacy workspace layouts.

Suggested change
xargs -0 grep -l '^service' | sed 's|.*/external/googleapis/||' | sort
xargs -0 grep -l '^service' | sed 's|.*/external/googleapis[^/]*/||' | sort

@codecov

codecov Bot commented Jul 31, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.30%. Comparing base (842dfb2) to head (a1dccb9).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #16305      +/-   ##
==========================================
- Coverage   92.30%   92.30%   -0.01%     
==========================================
  Files        2223     2223              
  Lines      208177   208177              
==========================================
- Hits       192165   192158       -7     
- Misses      16012    16019       +7     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@colinmoy colinmoy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

See the gemini bot's suggestion

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