Skip to content

refactor(internal/config): remove deprecated libraries_bom_version from JavaModule#6584

Open
sofisl wants to merge 5 commits into
googleapis:mainfrom
sofisl:finalizeDefaultJava
Open

refactor(internal/config): remove deprecated libraries_bom_version from JavaModule#6584
sofisl wants to merge 5 commits into
googleapis:mainfrom
sofisl:finalizeDefaultJava

Conversation

@sofisl

@sofisl sofisl commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Finalizes the migration to JavaDefault by removing the deprecated libraries_bom_version field from the JavaModule struct, its merging logic, and its library-level fallback check in the generator. This is backwards compatibile because it is only defined once at the global default.java level in librarian.yaml in google-cloud-java. Follow up to #6447.

Fixes #5171

sofisl added 2 commits June 29, 2026 23:47
…etadata

Remove the Java-specific mapping in RepoMetadataTransport that translated
transport values to "http" or "both". Now it returns the standard values
("grpc", "rest", "grpc+rest") directly, aligning Java with other languages.

Fixes googleapis#4854

@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 removes the unused LibrariesBOMVersion field from the Java configuration and simplifies the RepoMetadataTransport logic for Java to return the transport directly, updating associated tests accordingly. The review feedback suggests refactoring the findBOMVersion function signature to remove the library parameter, which is now unused after these changes.

I am having trouble creating individual review comments. Click here to see my feedback.

internal/librarian/java/generate.go (341-343)

medium

Removing the check for library.Java.LibrariesBOMVersion makes the library parameter in findBOMVersion unused. Consider refactoring the function signature to remove the library parameter to keep the code clean and adhere to the YAGNI principle.

References
  1. Avoid passing variables to functions for future, unimplemented use cases. Adhere to the YAGNI (You Ain't Gonna Need It) principle.

@sofisl sofisl marked this pull request as ready for review June 30, 2026 01:17
@sofisl sofisl requested a review from a team as a code owner June 30, 2026 01:17

@g-husam g-husam 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.

LGTM but might want someone more familiar to review

Comment thread internal/librarian/java/repometadata_test.go
Comment thread internal/serviceconfig/api.go
@sofisl sofisl requested a review from JoeWang1127 June 30, 2026 20:51
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: define a JavaDefault instead of JavaModule

3 participants