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

EVG-18584 Upgrade go to go1.19 #6285

Merged
merged 11 commits into from Feb 27, 2023
Merged

Conversation

ybrill
Copy link
Contributor

@ybrill ybrill commented Feb 23, 2023

EVG-18584

Description

This will upgrade go to 1.19. Once BUILD-16720 puts 1.20 on the hosts it'll be a hop, skip, and a jump to upgrade to 1.20 (EVG-19048).

No major changes. Most of the changes are because:

  • two linters were deprecated and replaced with the unused linter, which we're already using anyway.
  • the ioutil package was deprecated in go1.16. I don't know what possessed me (I feel like the linter was complaining but I can't find it now), but I changed the places we called it to use the recommended functions
  • the linter decided it wanted a bunch of files goimportsed
  • goimports (and gofmt) was formatting a bunch of the //nolint directives to // nolint (as of go1.19) which the docs say one shouldn't do "because machine-readable comments should have no space by Go convention". It would annoy nolintlint if we had it enabled. The suggested solution is to follow the correct format so the tools recognize it as a directive. Along the way I discovered //nolint:all isn't understood by the evg-linter (EVG-19049) but I was able to specify specifically //nolint:evg-lint

Testing

Works in staging™️

Does this need documentation?

No

@ybrill ybrill requested a review from a team February 23, 2023 23:26
Copy link
Contributor

@johndaniels johndaniels left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for splitting up the steps of the changes!

@@ -203,7 +203,7 @@ coverageHtmlOutput := $(foreach target,$(packages),$(buildDir)/output.$(target).
$(buildDir)/.lintSetup:$(buildDir)/golangci-lint
@touch $@
$(buildDir)/golangci-lint:
@curl --retry 10 --retry-max-time 120 -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(buildDir) v1.40.0 >/dev/null 2>&1 && touch $@
@curl --retry 10 --retry-max-time 120 -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(buildDir) v1.51.2 >/dev/null 2>&1 && touch $@
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This alone makes me very happy.

@ybrill
Copy link
Contributor Author

ybrill commented Feb 27, 2023

Opened evergreen-ci/spruce#1702 to fix spruce's e2e test.

@ybrill ybrill merged commit e1789d9 into evergreen-ci:main Feb 27, 2023
@ybrill ybrill deleted the EVG-18584_go1.19 branch February 27, 2023 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants