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 Golang 1.23 #6169

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

gmalouf
Copy link
Contributor

@gmalouf gmalouf commented Nov 14, 2024

Summary

This upgrades go-algorand to Golang 1.23.3, including necessary linter and Dockerfile updates.

Should close #6151 as well.

Test Plan

Existing tests/test suite all should pass.

@gmalouf gmalouf self-assigned this Nov 14, 2024
@gmalouf gmalouf changed the title Build: Upgrade to Golang 1.23.3. Build: Upgrade to Golang 1.23.3 Nov 14, 2024
@gmalouf gmalouf changed the title Build: Upgrade to Golang 1.23.3 Build: Upgrade to Golang 1.23 Nov 14, 2024
cmd/goal/application.go Show resolved Hide resolved
@@ -69,14 +69,14 @@ func findRootKeys(algodDir string) []*crypto.SignatureSecrets {
var handle db.Accessor
handle, err := db.MakeErasableAccessor(path)
if err != nil {
return nil //nolint:nilerr // don't care, move on
return nil
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is the nilerr linter willing to allow this now?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

cmd/loadgenerator/main.go:72:15: directive `//nolint:nilerr // don't care, move on` is unused for linter "nilerr" (nolintlint)
			return nil //nolint:nilerr // don't care, move on
			           ^
cmd/loadgenerator/main.go:79:15: directive `//nolint:nilerr // don't care, move on` is unused for linter "nilerr" (nolintlint)
			return nil //nolint:nilerr // don't care, move on

Copy link
Contributor

@jannotti jannotti Nov 14, 2024

Choose a reason for hiding this comment

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

I don't get it. That's nilerr's whole job.

https://github.com/gostaticanalysis/nilerr

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It started warning me for having it, warning went away when I removed. Given what this code does, I wasn't too concerned.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, the code is certainly correct. But I don't see how nilerr knows that. It's doing exactly the thing nilerr thinks is bad, because it usually is.
@cce knows linters well. Any ideas?

@cce
Copy link
Contributor

cce commented Nov 14, 2024

one new thing in go 1.23 is the golang.org/x/exp/maps and golang.org/x/exp/slices packages are provided as builtin "maps" and "slices" packages now, so we don't need the golang.org/x/exp dependency.

@jannotti
Copy link
Contributor

jannotti commented Nov 14, 2024 via email

@@ -423,7 +423,6 @@ byte 0x%s
{pkTampered2, false},
}
for i, test := range decompressTests {
i, test, source := i, test, source
Copy link
Contributor

@algorandskiy algorandskiy Nov 15, 2024

Choose a reason for hiding this comment

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

src := fmt.Sprintf(source below now modifies the original source program in parallel t.Run() captures the source content after modification below the loop

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Self-compiled MacOS binaries being killed on launch
4 participants