Skip to content

feat(internal/librarian/java): remove redundant keep items in librarian.yaml#6291

Open
sofisl wants to merge 7 commits into
mainfrom
removeRedundantItems2TheStreets
Open

feat(internal/librarian/java): remove redundant keep items in librarian.yaml#6291
sofisl wants to merge 7 commits into
mainfrom
removeRedundantItems2TheStreets

Conversation

@sofisl

@sofisl sofisl commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

This PR removes redundant items in the keep property in a librarian.yaml if it is inside gapic client module, and is a manual file. This PR also introduces a small refactor: since the Java clean.go also makes a determination whether a file is manual or not, this PR extracts that logic, creates a helper function, and then reuses it for our purposes as well.

Fixes #6163

Comment thread internal/librarian/java/defaults.go

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request updates the Tidy configuration functions across multiple languages (Java, Node.js, Python, and Rust) to accept a repoDir parameter. In Java, this parameter is used to determine if files in the keep configuration are manually maintained within GAPIC modules, preventing them from being incorrectly removed during the tidy process. Additionally, corresponding unit tests have been updated and a new test case TestTidy_ManualFiles has been added to verify this behavior. There are no review comments, so I have no feedback to provide.

@sofisl sofisl force-pushed the removeRedundantItems2TheStreets branch 2 times, most recently from 2843809 to 3077d0a Compare June 3, 2026 22:17
Comment thread internal/librarian/tidy.go Outdated
@sofisl sofisl marked this pull request as ready for review June 5, 2026 20:35
@sofisl sofisl requested a review from a team as a code owner June 5, 2026 20:35
@sofisl sofisl requested a review from zhumin8 June 5, 2026 20:43
Comment thread internal/librarian/java/clean.go Outdated
@sofisl sofisl requested a review from zhumin8 June 9, 2026 23:34
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.

java: remove redundant keep items in gapic client module

2 participants