Skip to content

Revert "fix(java): batch formatting and run GJF twice" - #7178

Merged
zhumin8 merged 1 commit into
mainfrom
revert-7155-fix/java-format-double-pass
Aug 4, 2026
Merged

zhumin8 merged 1 commit into
mainfrom
revert-7155-fix/java-format-double-pass

Conversation

@zhumin8

@zhumin8 zhumin8 commented Aug 4, 2026 •

Copy link
Copy Markdown
Contributor

Reverts #7155

The #7155 changes FormatLibraries to collect every .java file across all modules into a single allFiles slice, Passing all file paths as discrete CLI arguments in a single command exceeds the OS's maximum command-line argument size limit.

Fixes #7177

@zhumin8
zhumin8 requested a review from a team as a code owner August 4, 2026 04:59
@zhumin8
zhumin8 enabled auto-merge (squash) August 4, 2026 04:59

@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 refactors the Java library formatting logic by replacing the batch formatting function FormatLibraries with a single-library formatting function Format, and simplifies the process by running google-java-format only once. Feedback is provided on a test assertion in TestFormat_LookPathError where t.Fatal(err) is incorrectly called when err is nil, which would produce an unhelpful test failure message.

Comment thread internal/librarian/java/format_test.go Resolved
@zhumin8
zhumin8 merged commit 4b0f949 into main Aug 4, 2026
67 of 68 checks passed
@zhumin8
zhumin8 deleted the revert-7155-fix/java-format-double-pass branch August 4, 2026 11:55
sofisl pushed a commit to sofisl/librarian that referenced this pull request Aug 10, 2026
Reverts googleapis#7155

the PR changes FormatLibraries to collect every .java file across all
modules into a single allFiles slice, Passing all file paths as discrete
CLI arguments in a single command exceeds the OS's maximum command-line
argument size limit.

Fixes googleapis#7177
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.

google-cloud-java: librarian generate fails when run at HEAD

2 participants