Open PaulRashidi opened 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.
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!
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.
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