Skip to content
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

spanner: Imports "testing" #5326

Closed
aaronbee opened this issue Jan 10, 2022 · 1 comment · Fixed by #5327
Closed

spanner: Imports "testing" #5326

aaronbee opened this issue Jan 10, 2022 · 1 comment · Fixed by #5327
Assignees
Labels
api: spanner Issues related to the Spanner API. triage me I really want to be triaged.

Comments

@aaronbee
Copy link

aaronbee commented Jan 10, 2022

spanner v1.29.0 imports the standard library "testing" package: https://github.com/googleapis/google-cloud-go/blob/spanner/v1.29.0/spanner/stats.go#L22

This adds an unwanted dependency to programs that import the spanner module. Imports of "testing" should be limited to _test.go files or test packages that don't get imported by production packages.

Expected behavior

$ go list -deps cloud.google.com/go/spanner | grep '^testing$'

should have an empty result

Actual behavior

$ go list -deps cloud.google.com/go/spanner | grep '^testing$'
testing

Additional context

Added in this PR: #5199

@aaronbee aaronbee added the triage me I really want to be triaged. label Jan 10, 2022
@product-auto-label product-auto-label bot added the api: spanner Issues related to the Spanner API. label Jan 10, 2022
@codyoss
Copy link
Member

codyoss commented Jan 10, 2022

Thanks @aaronbee! I have opened a PR to fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: spanner Issues related to the Spanner API. triage me I really want to be triaged.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants