bazelbuild / bazel-central-registry

The central registry of Bazel modules for the Bzlmod external dependency system.
https://registry.bazel.build
Apache License 2.0
233 stars 254 forks source link

wanted: [google/go-cmp] #2272

Open PaulRashidi opened 2 weeks ago

PaulRashidi commented 2 weeks ago

Module location

https://github.com/google/go-cmp

Link to bzlmod issue in the module's repository

No response

Any other context to provide?

Rather standard comparison library used commonly in unit tests because of it's verbose output that is easily human readable.

Fund our work

fmeum commented 2 weeks ago

Isn't this a pure Go dependency? Then go_deps should handle it and it wouldn't need to become a BCR module.

PaulRashidi commented 2 weeks ago

I have requested https://pkg.go.dev/github.com/google/go-cmp/cmp which should not be confused with https://pkg.go.dev/cmp despite the same "cmp" final package name part. The former package notably has Diff which is very handy in unit tests to show got/want differences for assertions in a simple format. The former package also works with https://pkg.go.dev/google.golang.org/protobuf/testing/protocmp to provide enhanced directives around the diff/equal comparisons. It is worth noting that the package I'm requesting is only supposed to be used for tests per the package comments.

I'm new to Bazel; especially how the rules resolve and how to find the correct way to import each rule. Please let me know if I've misunderstood and the package is already available.

Thanks!

fmeum commented 2 weeks ago

Please take a look at https://github.com/bazelbuild/rules_go/blob/master/docs/go/core/bzlmod.md#external-dependencies, which documents how to get any non-Bazel Go dependency into your Bazel build.