Skip to content

golang: go mod tidy should be run post-generation by librarian #5519

@noahdietz

Description

@noahdietz

After doing a standard update & generate for google-cloud-go, my PR failed a vet check in one GAPIC module (check) due to a missing direct dependency in the go.mod of a single submodule that was updated in the PR.

The API that changed and was regenerated added a new direct dependency to their API surface - a common type from google/rpc/status.proto.

This was fixed by doing cd {module} && go mod tidy (using the target version of Go which was Go 1.25.0 as of writing this).

It would be great if librarian did this as a post generate step in the client module output dir after regenerating each library.

I think this depends on #5201 being fixed as well, where the target version of the Go tool used by google-cloud-go can be executed instead of the version of the Go tool used to execute librarian.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions