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

std,cmd: add test to ensure that all modules in GOROOT are tidy #43687

Closed
dmitshur opened this issue Jan 14, 2021 · 2 comments
Closed

std,cmd: add test to ensure that all modules in GOROOT are tidy #43687

dmitshur opened this issue Jan 14, 2021 · 2 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. Testing An issue that has been verified to require only test changes, not just a test failure.
Milestone

Comments

@dmitshur
Copy link
Contributor

dmitshur commented Jan 14, 2021

We can add a test that catches and reports when the a module in GOROOT is not tidy.

Having an automated test for this will prevent it from happening without anyone noticing, and it makes it easier for humans to review CLs that modify go.mod files, since they won't need to worry about checking this manually.

It's probably not a big deal if a module isn't tidy, but it turned out to be easy and inexpensive to perform this check as part of the test for #36852 and #41409, so let's try it. (If we find that it's unhelpful, or there are situations when modules must be non-tidy, we can remove it.)

CC @golang/release.

@dmitshur dmitshur added Testing An issue that has been verified to require only test changes, not just a test failure. NeedsFix The path to resolution is known, but the work has not been done. labels Jan 14, 2021
@dmitshur dmitshur added this to the Go1.16 milestone Jan 14, 2021
@dmitshur dmitshur self-assigned this Jan 14, 2021
@gopherbot
Copy link

Change https://golang.org/cl/283643 mentions this issue: cmd/internal/moddeps: check content of all modules in GOROOT

@bcmills
Copy link
Contributor

bcmills commented Jan 14, 2021

If … there are situations when modules must be non-tidy, we can remove it.

If we find any such situation, I would consider that a usability defect in the go command, and I would want to fix it there instead of removing the tidiness check.

@golang golang locked and limited conversation to collaborators Jan 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. Testing An issue that has been verified to require only test changes, not just a test failure.
Projects
None yet
Development

No branches or pull requests

4 participants
@dmitshur @bcmills @gopherbot and others