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

build: upgrade to go1.22 #20066

Merged
merged 6 commits into from
Mar 6, 2024
Merged

build: upgrade to go1.22 #20066

merged 6 commits into from
Mar 6, 2024

Conversation

shoenig
Copy link
Contributor

@shoenig shoenig commented Mar 4, 2024

oof, there's some go-msgpack problems with go1.22

 ==> Running go generate...
codecgen error: error running 'go run codecgen-main-102.generated.go': exit status 1, console: panic: encoding alphabet includes duplicate symbols

goroutine 1 [running]:
encoding/base64.NewEncoding(...)
	/opt/hostedtoolcache/go/1.22.0/x64/src/encoding/base64/base64.go:82
github.com/hashicorp/go-msgpack/codec.init()
	/home/runner/go/pkg/mod/github.com/hashicorp/go-msgpack@v1.1.5/codec/gen.go:140 +0xce6
exit status 2

It appears NewEncoding no longer allows duplicate characters in the alphabet you supply.
https://go-review.googlesource.com/c/go/+/520335

However go-msgpack (and upstream ugorji) use two underscores in the msgpack alphabet.
https://github.com/hashicorp/go-msgpack/blob/v2.1.1/codec/gen.go#L135

@shoenig
Copy link
Contributor Author

shoenig commented Mar 4, 2024

Fixed go-msgpack with v1.1.5+base32 which uses base32 encoding instead of a broken base64 encoding.

Also needed to update

stringer to v0.18.0

hclogvet to v0.2.0

golangci-lint to v1.56.2

@shoenig shoenig marked this pull request as ready for review March 5, 2024 18:19
@shoenig shoenig requested review from lgfa29, gulducat and tgross March 5, 2024 18:19
@shoenig shoenig added backport/1.5.x backport to 1.5.x release line backport/1.6.x backport to 1.6.x release line backport/1.7.x backport to 1.7.x release line labels Mar 6, 2024
Copy link
Member

@tgross tgross left a comment

Choose a reason for hiding this comment

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

LGTM

@shoenig shoenig merged commit 55b0795 into main Mar 6, 2024
25 checks passed
@shoenig shoenig deleted the upgrade-go-122 branch March 6, 2024 15:54
shoenig added a commit that referenced this pull request Mar 6, 2024
(manual cherry-pick of 55b0795)

* build: upgrade to go1.22

* add cl

* build: use codecgen from go-msgpack v1.1.5+base32 and stringer 0.18.0

for compatability with go1.22

* ci: update golangci-lint to 1.56.2

* build: update hclogvet for go1.22

* build: bump to go1.22.1
shoenig added a commit that referenced this pull request Mar 6, 2024
(manual cherry-pick of 55b0795)

* build: upgrade to go1.22

* add cl

* build: use codecgen from go-msgpack v1.1.5+base32 and stringer 0.18.0

for compatability with go1.22

* ci: update golangci-lint to 1.56.2

* build: update hclogvet for go1.22

* build: bump to go1.22.1

Co-authored-by: Seth Hoenig <shoenig@duck.com>
Copy link

I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 17, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/1.5.x backport to 1.5.x release line backport/1.6.x backport to 1.6.x release line backport/1.7.x backport to 1.7.x release line
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants