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

chore: upgrade to Go 1.20 #10068

Merged
merged 3 commits into from
Aug 22, 2023
Merged

chore: upgrade to Go 1.20 #10068

merged 3 commits into from
Aug 22, 2023

Conversation

hacdias
Copy link
Member

@hacdias hacdias commented Aug 15, 2023

@hacdias hacdias added the skip/changelog This change does NOT require a changelog entry label Aug 15, 2023
@hacdias hacdias self-assigned this Aug 15, 2023
@hacdias hacdias changed the title chore: upgrade from Go 1.19 to Go 1.20 chore: upgrade to Go 1.20 Aug 15, 2023
@hacdias hacdias force-pushed the go-1.20 branch 4 times, most recently from adffe99 to e9f3af8 Compare August 15, 2023 15:56
docs/changelogs/v0.23.md Outdated Show resolved Hide resolved
@hacdias hacdias force-pushed the go-1.20 branch 4 times, most recently from 9ffabbe to 37bdf9d Compare August 22, 2023 11:48
@hacdias hacdias mentioned this pull request Aug 22, 2023
Copy link
Member

@lidel lidel left a comment

Choose a reason for hiding this comment

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

@hacdias thank you, lgtm, small nits to address inline, but other than that ok to merge.

client/rpc/api.go Show resolved Hide resolved
client/rpc/requestbuilder.go Outdated Show resolved Hide resolved
version.go Outdated Show resolved Hide resolved
- Bumps golangci-lint to work for the new Go version
- Removes rand.Seed, which has been deprecated. It is seeded by default
  with a random value since Go 1.20.
- Replaces deprecated Fuse errors with syscall.Errno
The way we create the kubo binary for coverage is very hacky.
It uses the testing tool. In order to simulate a Kubo binary,
we need to supress all the output that would otherwise be printed
by 'go test'.

So far, we were setting os.Stdout and os.Stderr as a read-only
/dev/null file descriptor. This is causing issues with the new
versions of Go:

    error generating coverage report: write /dev/null: bad file descriptor
    exit status 2

Updating it to a Read-Write file descriptor solves the problem.
I did not try looking into what is causing this issue now. There have
been some updates to the 'go test' tool in Go 1.20 and it is likely
that some error is now being checked for that hasn't been checked
before. Writing to a read-only file descriptor always failed. But
the error was just supressed somehow.
@hacdias hacdias enabled auto-merge (rebase) August 22, 2023 13:40
@hacdias hacdias merged commit 1e5ce93 into master Aug 22, 2023
16 checks passed
@hacdias hacdias deleted the go-1.20 branch August 22, 2023 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Support go1.20
3 participants