bazel-contrib / bazel-gazelle

Gazelle is a Bazel build file generator for Bazel projects. It natively supports Go and protobuf, and it may be extended to support new languages and custom rule sets.
Apache License 2.0
1.21k stars 381 forks source link

Writing resolved Go modules as K:V JSON for external bookkeeping #1906

Open Buzz-Lightyear opened 3 months ago

Buzz-Lightyear commented 3 months ago

What type of PR is this? Feature

What package or component does this PR mostly affect? go_deps extension

What does this PR do? Why is it needed? I'd like the go_deps module extension to expose the mapping between every Go module it bazelizes and its resolved version. This would be extremely useful for external bookkeeping (for e.g. we can easily communicate to CI systems that rely on native package manager metadata, precisely what version of each Go module was used in the build).

Which issues(s) does this PR fix? Fixes #1905

google-cla[bot] commented 3 months ago

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

fmeum commented 2 months ago

The implementation looks reasonable, I'm just not sure whether this is the right way to export this information and thus don't want to commit to it yet.

Could you perhaps create a discussion on this repo and use it to explain your use case in more detail? I would like to gather more feedback from the community so that we can make more informed design decisions.

Buzz-Lightyear commented 2 months ago

Sounds good @fmeum , started https://github.com/bazelbuild/bazel-gazelle/discussions/1918