-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
fix: ci for go 1.19 and standard generated header #1301
Conversation
Use the standard generated header for golang files as defined by: https://pkg.go.dev/cmd/go#hdr-Generate_Go_files_by_processing_source
ce509e1
to
55a9a2e
Compare
533b677
to
813a931
Compare
Don't run gofmt or go generate on go versions below 1.19 as it introduced formatting changes for block comments hence the output is different from previous versions. This also centralises the ci in main.yml making it easier to maintain. Also: * Add go mod tidy step. * Bump go versions to the supported versions 1.18 and 1.19
813a931
to
e93b9f3
Compare
Include unknown files to ensure we capture the case where a new file is generated but not committed.
Don't use verbose mode for tests as it makes it harder to find tests that fail.
Yer my take as just to go with the latest formatting 1.19+, and skip tests on earlier versions. |
Too many unrelated changes in a single MR. This is too much work to review and accept/reject individual changes. Please resubmit changes in separate MR well contained if they still apply. |
About Centralise the ci in the github workflow file so its easier to maintain., I disagree because it make harder to debug the CI build steps on a developer's machine. You should at least explain why you think it's easier to maintain. |
Have split this up into the 2 separate PRs with the two key change sets For the workflow change if you want to test locally I would recommend act for that. However as the flows themselves are very basic, they are unlikely to need any debugging. Two clean up steps:
Two validation steps, which are both handled by editors so should be no-op for the developer:
Hope this helps. |
Looks like the standard headers have already been done, didn't spot that as this was still pending, so just workflow improvements left. |
Summary
Fix continuous integration with go 1.19 and use the standard generated header for golang files.
Changes
Motivation
Allows tools which comply with the recommended header to correctly detect the files are generated.
Allow users on go 1.19+ to contribute without having to install old versions of golang.
Centralise the ci in the github workflow file so its easier to maintain.