Skip to content

Conversation

@ti-mo
Copy link
Collaborator

@ti-mo ti-mo commented Oct 13, 2025

A change to stringer broke main, so it's time to use go tool for all go:generate statements. Use it for internal tools too, and suggest it as a best practice in documentation and help text.

ti-mo added 2 commits October 13, 2025 10:55
Go 1.24 introduces the new `tool` statement in go.mod. Add it with
`go get -tool golang.org/x/tools/cmd/stringer@latest` to make code gen
more consistent and reproducible across time and Go versions.

Signed-off-by: Timo Beckers <[email protected]>
For internal tools, `go tool` provides nice shorthands instead of the typical
`go run ...` with the full module path. Use this convention for bpf2go and
gentypes.

Signed-off-by: Timo Beckers <[email protected]>
@ti-mo ti-mo requested review from a team and dylandreimerink as code owners October 13, 2025 09:17
@dylandreimerink
Copy link
Member

Changes look good. But, I guess we need to figure out a way to let staticcheck ignore generated files 🙄

lmb
lmb previously approved these changes Oct 13, 2025
@ti-mo ti-mo dismissed stale reviews from lmb and dylandreimerink via 7c04987 October 13, 2025 09:49
@ti-mo
Copy link
Collaborator Author

ti-mo commented Oct 13, 2025

@lmb Could use some input here on why the Windows tests could be failing. x/sys got an upgrade in this PR, could be the culprit?

@ti-mo ti-mo merged commit c27ff92 into cilium:main Oct 13, 2025
28 of 33 checks passed
@ti-mo ti-mo deleted the tb/go-tool-stringer branch October 13, 2025 12:53
@ti-mo ti-mo added the hacktoberfest-accepted For folks participating in Hacktoberfest! label Oct 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hacktoberfest-accepted For folks participating in Hacktoberfest!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants