feat(internal/librarian/golang): support configurable tool dependencies in librarian.yaml#5421
feat(internal/librarian/golang): support configurable tool dependencies in librarian.yaml#5421
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces support for Go tool installation via the librarian.yaml configuration, including schema updates, configuration struct additions, and implementation of the installation logic with a fallback mechanism. Feedback focuses on handling cases where a tool version is not specified to avoid invalid go install commands, and removing the unused Exec field from both the configuration and documentation to adhere to the YAGNI principle.
|
@noahdietz, here are a few decisions/assumptions I made in this PR (feel free to correct me!):
some more questions about exec - do you want it to be derived if not specified? (according to #5201)? |
Should we file an issue as a follow up to remove the hardcode tools once the tool section is introduced to librarian.yaml in google-cloud-go? |
Co-authored-by: Joe Wang <106995533+JoeWang1127@users.noreply.github.com> Signed-off-by: sofisl <55454395+sofisl@users.noreply.github.com>
…-level variables, remove unnecessary check for embedded tools
|
Thanks for all the indepth reviews! |
The current install implementation for golang has a hard-coded list of modules and versions to install. This makes it difficult to update the versions of Go tools used for GAPIC generation per repository. This change adds support for defining Go tool dependencies in librarian.yaml under the
toolsproperty, similar to other languages. It introduces theGoToolstruct in config, updates the installer to fetch dependencies from configuration (falling back to defaults if not defined), and regenerates the configuration schema documentation.Fixes #5377