GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(librariangen): scaffold Java language container for Librarian by meltsufin · Pull Request #3926 · googleapis/sdk-platform-java

This repository was archived by the owner on Oct 29, 2026. It is now read-only.

Conversation

@meltsufin

@meltsufin meltsufin commented Oct 7, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

This change introduces the initial scaffolding for librariangen, a containerized Go application that will serve as the Java-specific code generator within the Librarian pipeline.

The primary goal of this change is to establish the foundational components for the Java language container, including:

  • A new librariangen CLI application: Written in Go, this will be the entry point for Java code generation tasks invoked by Librarian. It currently includes basic command dispatching and support for --version.
  • A multi-stage Dockerfile: This creates a minimal container image for librariangen.
  • Unit tests and CI: A new GitHub Actions workflow has been added to build and test the librariangen executable.

This scaffolding is the first step in implementing the full code generation logic within the Librarian system, eventually replacing the Java hermetic code generation system.

The code is largely adapted from the Go language container at https://github.com/googleapis/google-cloud-go/tree/main/internal/librariangen.

Fixes: googleapis/librarian#2500

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@meltsufin
feat: initial librariangen CLI and Docker support for Java
676031a
@meltsufin
meltsufin requested a review from suztomo October 7, 2025 20:04
@product-auto-label product-auto-label Bot added the size: l Pull request size is large. label Oct 7, 2025
meltsufin added 2 commits October 7, 2025 20:07
@meltsufin
chore: fix go.mod location
fa3fe47
@meltsufin
refactor(librariangen): move docker build to local script
a407d73
The Docker build and test steps were moved from the GitHub Actions workflow to a local script. This is because the base Docker image is not accessible from GitHub Actions.

The CI workflow now only runs the Go tests. The new `build-docker-and-test.sh` script can be used to build the Docker image and run the version check locally.
@sonarqubecloud

sonarqubecloud Bot commented Oct 7, 2025

Copy link
Copy Markdown

Quality Gate Passed Quality Gate passed for 'gapic-generator-java-root'

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@sonarqubecloud

sonarqubecloud Bot commented Oct 7, 2025

Copy link
Copy Markdown

Quality Gate Passed Quality Gate passed for 'java_showcase_integration_tests'

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

suztomo
suztomo suggested changes Oct 8, 2025
View reviewed changes

@suztomo suztomo left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

The "internal" folder having only librariangen folder is strange. It's because we are not going to move other internal things (such as "hermetic_build") to the folder.

Shall we remove the "internal" folder?

For example, Python team's Dockerfile is at https://github.com/googleapis/google-cloud-python/tree/main/.generator.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
suztomo
suztomo reviewed Oct 8, 2025
View reviewed changes
Comment thread internal/librariangen/main_test.go
"testing"
)

func TestRun(t *testing.T) {

@suztomo suztomo Oct 8, 2025

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

The argument parsing logic is to be in the shared module, so that each language container doesn't need to implement the argument parsing logic and its tests. https://github.com/googleapis/librarian/pull/2489/files#diff-704975122c152b21ff033c97bc92e9f3dc765402bf278620a3f88df835a9dd43R41

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@suztomo suztomo Oct 8, 2025

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

So you don't have to write many test cases for argument parsing.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@meltsufin meltsufin Oct 8, 2025

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

That's great, but let's integrate that in when it's ready.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@suztomo

suztomo commented Oct 8, 2025

Copy link
Copy Markdown
Member

It's nice that this started with small.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@meltsufin

meltsufin commented Oct 8, 2025

Copy link
Copy Markdown
Contributor Author

The "internal" folder having only librariangen folder is strange. It's because we are not going to move other internal things (such as "hermetic_build") to the folder.

Shall we remove the "internal" folder?

For example, Python team's Dockerfile is at https://github.com/googleapis/google-cloud-python/tree/main/.generator.

This is a Go convention for non-exported packages that is enforced by the compiler and I think it's appropriate for our use-case: https://go.dev/doc/go1.4#internalpackages.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@meltsufin
meltsufin requested a review from suztomo October 8, 2025 14:00
@suztomo

suztomo commented Oct 8, 2025

Copy link
Copy Markdown
Member

@meltsufin Thank you for the info. The "internal" folder or its parent doesn't have go.mod. I'm not sure the "internal" is recognized as a package. Would you be willing to experiment the "internal" folder is indeed following https://go.dev/doc/go1.4#internalpackages ? I think it's a matter of whether a symbol var Hello = "World" in internal/librariangen/main.go is visible by another program or not.

(In another go program's go.sum you would declare require https://github.com/googleapis/sdk-platform-java/internal/librariangen a407d733df5650041d4bfe01b4dd49f78fe175cf and try to reference the symbol librariangen.Hello)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

suztomo
suztomo approved these changes Oct 8, 2025
View reviewed changes

@suztomo suztomo left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

(Approving this to unblock the work) I still want to know the "internal" experiment above.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@meltsufin

meltsufin commented Oct 8, 2025

Copy link
Copy Markdown
Contributor Author

(Approving this to unblock the work) I still want to know the "internal" experiment above.

@suztomo

Tried importing from another module even within the same repo and got the expected:
main.go:4:8: use of internal package cloud.google.com/java/internal/librariangen not allowed.

go.mod:

replace cloud.google.com/java/internal/librariangen => ../internal/librariangen
require cloud.google.com/java/internal/librariangen v0.0.0-00010101000000-000000000000
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@meltsufin
meltsufin merged commit 29d188d into main Oct 8, 2025
@meltsufin
meltsufin deleted the librariangen-init branch October 8, 2025 17:32
@release-please release-please Bot mentioned this pull request Oct 8, 2025
chore(main): release 2.63.0 #3927
Merged
@suztomo

suztomo commented Oct 8, 2025

Copy link
Copy Markdown
Member

@meltsufin Thank you!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

lqiu96 pushed a commit that referenced this pull request Oct 16, 2025
@release-please
chore(main): release 2.63.0 (#3927)
6473668
🤖 I have created a release *beep* *boop*
---


<details><summary>2.63.0</summary>

##
[2.63.0](v2.62.3...v2.63.0)
(2025-10-16)


### Features

* **librariangen:** add bazel package
([#3940](#3940))
([feabef3](feabef3))
* **librariangen:** add execv package
([#3932](#3932))
([f6b0b47](f6b0b47))
* **librariangen:** add protoc package
([#3935](#3935))
([598de06](598de06))
* **librariangen:** add request package
([#3933](#3933))
([fe44aed](fe44aed))
* **librariangen:** scaffold Java language container for Librarian
([#3926](#3926))
([29d188d](29d188d))


### Dependencies

* Bump errorprone-annotations to v2.42.0
([8d6c1f9](8d6c1f9))
* Bump guava to v33.5.0
([8d6c1f9](8d6c1f9))
* Bump j2objc-annotations to v3.1
([8d6c1f9](8d6c1f9))
* update google auth library dependencies to v1.40.0
([#3945](#3945))
([1d74663](1d74663))
* Upgrade Google Http Java Client to v2.0.2
([#3946](#3946))
([7fb4f15](7fb4f15))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
meltsufin added a commit that referenced this pull request Oct 24, 2025
@meltsufin
Revert "feat(librariangen): scaffold Java language container for Libr…
19dd732
…arian (#3926)"

This reverts commit 29d188d.
@release-please release-please Bot mentioned this pull request Dec 11, 2025
chore(protobuf-4.x-rc): release 2.65.0-rc1 #3999
Merged
lqiu96 pushed a commit that referenced this pull request Feb 12, 2026
@meltsufin @lqiu96
feat(librariangen): scaffold Java language container for Librarian (#…
f207051
…3926)

This change introduces the initial scaffolding for `librariangen`, a
containerized Go application that will serve as the Java-specific code
generator within the Librarian pipeline.

The primary goal of this change is to establish the foundational
components for the Java language container, including:
* A new `librariangen` CLI application: Written in Go, this will be the
entry point for Java code generation tasks invoked by Librarian. It
currently includes basic command dispatching and support for
`--version`.
* A multi-stage `Dockerfile`: This creates a minimal container image for
librariangen.
* Unit tests and CI: A new GitHub Actions workflow has been added to
build and test the librariangen executable.

This scaffolding is the first step in implementing the full code
generation logic within the Librarian system, eventually replacing the
Java hermetic code generation system.

The code is largely adapted from the Go language container at
https://github.com/googleapis/google-cloud-go/tree/main/internal/librariangen.

Fixes: googleapis/librarian#2500
lqiu96 pushed a commit that referenced this pull request Feb 12, 2026
@release-please @lqiu96
chore(main): release 2.63.0 (#3927)
48954a4
🤖 I have created a release *beep* *boop*
---


<details><summary>2.63.0</summary>

##
[2.63.0](v2.62.3...v2.63.0)
(2025-10-16)


### Features

* **librariangen:** add bazel package
([#3940](#3940))
([feabef3](feabef3))
* **librariangen:** add execv package
([#3932](#3932))
([f6b0b47](f6b0b47))
* **librariangen:** add protoc package
([#3935](#3935))
([598de06](598de06))
* **librariangen:** add request package
([#3933](#3933))
([fe44aed](fe44aed))
* **librariangen:** scaffold Java language container for Librarian
([#3926](#3926))
([29d188d](29d188d))


### Dependencies

* Bump errorprone-annotations to v2.42.0
([8d6c1f9](8d6c1f9))
* Bump guava to v33.5.0
([8d6c1f9](8d6c1f9))
* Bump j2objc-annotations to v3.1
([8d6c1f9](8d6c1f9))
* update google auth library dependencies to v1.40.0
([#3945](#3945))
([1d74663](1d74663))
* Upgrade Google Http Java Client to v2.0.2
([#3946](#3946))
([7fb4f15](7fb4f15))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
chingor13 pushed a commit to googleapis/google-cloud-java that referenced this pull request Mar 24, 2026
@release-please
chore(main): release 2.63.0 (#3927)
588b428
🤖 I have created a release *beep* *boop*
---


<details><summary>2.63.0</summary>

##
[2.63.0](googleapis/sdk-platform-java@v2.62.3...v2.63.0)
(2025-10-16)


### Features

* **librariangen:** add bazel package
([#3940](googleapis/sdk-platform-java#3940))
([d6bd0e0](googleapis/sdk-platform-java@d6bd0e0))
* **librariangen:** add execv package
([#3932](googleapis/sdk-platform-java#3932))
([7fc08a5](googleapis/sdk-platform-java@7fc08a5))
* **librariangen:** add protoc package
([#3935](googleapis/sdk-platform-java#3935))
([c3f7b9f](googleapis/sdk-platform-java@c3f7b9f))
* **librariangen:** add request package
([#3933](googleapis/sdk-platform-java#3933))
([c478a98](googleapis/sdk-platform-java@c478a98))
* **librariangen:** scaffold Java language container for Librarian
([#3926](googleapis/sdk-platform-java#3926))
([aec74aa](googleapis/sdk-platform-java@aec74aa))


### Dependencies

* Bump errorprone-annotations to v2.42.0
([4fa48a2](googleapis/sdk-platform-java@4fa48a2))
* Bump guava to v33.5.0
([4fa48a2](googleapis/sdk-platform-java@4fa48a2))
* Bump j2objc-annotations to v3.1
([4fa48a2](googleapis/sdk-platform-java@4fa48a2))
* update google auth library dependencies to v1.40.0
([#3945](googleapis/sdk-platform-java#3945))
([4b2c98e](googleapis/sdk-platform-java@4b2c98e))
* Upgrade Google Http Java Client to v2.0.2
([#3946](googleapis/sdk-platform-java#3946))
([89d518c](googleapis/sdk-platform-java@89d518c))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

1 more reviewer
@suztomo suztomo suztomo approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

size: l Pull request size is large.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Java: Create Dockerfile for Java language container

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@meltsufin @suztomo
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.