-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
ci: install all packages first #9981
Conversation
All packages need to be installed before we can run (some) of the checks and code generators reliably. More precisely, anything that using x/tools/go/loader is fragile (this includes stringer, vet and others). The blocking issue is golang/go#14120; see golang/go#10249 for some more concrete discussion on `stringer` and golang/go#16086 for `vet`.
build/builder.sh make check 2>&1 | go-test-teamcity | ||
# All packages need to be installed before we can run (some) of the checks | ||
# and code generators reliably. More precisely, anything that using | ||
# x/tools/go/loader is fragile (this includes stringer, vet and others). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't this imply we should add gotestdashi
as a dependency of make check
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does imply that, but we'd still need it here for stability (no reason we wouldn't reorder make check
and go generate
). I like @dt's idea though.
Could we do these steps inside style_check.go, wrapped in a |
@dt That's a good idea. Would you mind doing that? You can poach this PR for the commentary or I can merge it, your call (or whoever is up for putting in the elbow grease). |
One problem with the diff check though is that it mutates the repo state (running go generate). |
@tschottdorf I probably won't do that today, so don't wait for me -- if you want to merge for now and file an issue to follow up later? |
SGTM, will do once LGTSO |
Thanks for tracking down the upstream issues. I agree with @petermattis that this should be hooked into the relevant stuff globally, and not just in TC. |
Yes, but how do you hook it into |
Hmm, we could make a file that shows up first and make that run |
All packages need to be installed before we can run (some) of the checks and
code generators reliably. More precisely, anything that using x/tools/go/loader
is fragile (this includes stringer, vet and others).
The blocking issue is golang/go#14120; see
golang/go#10249 for some more concrete discussion on
stringer
and golang/go#16086 forvet
.This change is