Skip to content

Support Bazel go_repository "sum" field #4402

@rohansingh

Description

@rohansingh

What Renovate type are you using?
Renovate Hosted

Describe the bug
As of a couple releases ago, the go_repository rule in Bazel looks like this example:

go_repository(
    name = "com_github_pkg_errors",
    importpath = "github.com/pkg/errors",
    sum = "h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=",
    version = "v0.8.1",
)

Specifically, the new sum attribute has been added. Renovate is not able to handle these new go_repository rules.

To Reproduce
Steps to reproduce the behavior:

  1. Create repository with a Bazel WORKSPACE file and a go_repository rule like the one above.
  2. Configure Renovate to update Bazel dependencies.

Expected behavior
I expect a PR to be created to update the go_repository with a new version and sum value.

Additional context
This is how the go_repository documentation describes sum:

A hash of the module contents. In module mode, go_repository will verify the downloaded module matches this sum. May only be set when version is also set.

A value for sum may be found in the go.sum file or by running go mod download -json <module>@<version>.

Metadata

Metadata

Assignees

No one assigned

    Labels

    manager:gomodGo Modulespriority-4-lowLow priority, unlikely to be done unless it becomes important to more people

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions