-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dependency on "testing" from "google.golang.org/grpc/experimental/stats" #7568
Comments
To add a bit more color here, in our repo we check for unexpected dependencies of our binaries. This is done to reduce binary bloat, to avoid side effects of those dependencies (eg. importing "testing" use to register flags that are exposed by the final binary, but this is no longer the case), and just generally to have a cleaner dependency tree. A dependency we disallow in production binaries is "testing", which is how we noticed that grpc started depending on it. |
@aaronbee : Thanks for filing this issue. How do you check for unexpected dependencies of your binaries in your repo? Is that something that you can share with us? |
We have a small program (that's not open source, sorry) that uses golang.org/x/tools/go/packages to load a package and walk its dependency tree, reporting any uses of forbidden dependencies. Another simple way to this is with |
The change to remove the testing dependency got merged in #7579. Now, we need to do a patch release for this, and also need to think about if we want to add something simple like |
Do you have any timeline for the patch release? |
Actually, it was released in 1.66.2. So this issue probably could be closed. |
What version of gRPC are you using?
v1.66.0
What version of Go are you using (
go version
)?v1.22
What operating system (Linux, Windows, …) and version?
N/A
What did you do?
Verified my code didn't depend on "testing" in production binaries.
What did you expect to see?
No production dependency on "testing".
What did you see instead?
This comes from
grpc-go/experimental/stats/metricregistry.go
Line 255 in 005b092
The text was updated successfully, but these errors were encountered: