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: build with go 1.18.1 #8932

Merged
merged 3 commits into from
May 4, 2022
Merged

Conversation

aschmahmann
Copy link
Contributor

No description provided.

Copy link
Contributor

@Jorropo Jorropo left a comment

Choose a reason for hiding this comment

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

Is this needed ?
We bumped to go1.17 only when go1.18 released.

For dist.ipfs.io and the docker file I understand that we want to use go1.18 but unless we want to use go1.18 exclusive features,
I think we should continue to have a build test on go1.17 to be sure we support the two latest releases of go. (can you matrix the build instead ?)

@aschmahmann
Copy link
Contributor Author

aschmahmann commented May 3, 2022

Is this needed ? We bumped to go1.17 only when go1.18 released.

This was mostly anomalous because bumping to 1.17 was a bit of a pain due to the breakages to xxhash. In general we support the last two minor versions of Go and release with the latest.

For dist.ipfs.io and the docker file I understand that we want to use go1.18 but unless we want to use go1.18 exclusive features,
I think we should continue to have a build test on go1.17 to be sure we support the two latest releases of go. (can you matrix the build instead ?)

IMO this position isn't viable. If we're giving people go1.18 software to run (dist + docker) then that's what we primarily need to be testing.

However, yes doing multiple builds/tests across the various platforms you support is generally a good idea. We do this in almost every repo other than go-ipfs since Unified CI in https://github.com/protocol/.github takes care of this for us. We can certainly add more actual testing, but is #8931 not enough to prevent us from accidentally using features from the latest Go release that aren't available in the previous one (e.g. generics in Go 1.18) since it runs go vet?

@Jorropo
Copy link
Contributor

Jorropo commented May 3, 2022

then that's what we primarily need to be testing

I was thinking:

  • Distribute
    • 1.18
  • CI Test
    • 1.18
  • CI Build Only
    • 1.18
    • 1.17

Are I you fine with that ?

@aschmahmann
Copy link
Contributor Author

aschmahmann commented May 3, 2022

Are I you fine with that ?

For now that seems fine. We could also add additional testing so it's not just a simple "does it build" test. If you want to add some extra workflows here go for it.

Note the outstanding items to get things passing seem to be:

  • Switch builds to -buildvcs=false at least until we figure out how we want to handle this for Docker builds
  • Update go-ipfs-as-a-library examples to point at commit hash so it will work with Go 1.18
  • Update linter (it looks broken at the moment)

@aschmahmann aschmahmann force-pushed the chore/update-go-build-version branch from 7dec5bd to 203886d Compare May 4, 2022 15:43
Copy link
Contributor

@Jorropo Jorropo left a comment

Choose a reason for hiding this comment

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

LGTM, don't matrix with 1.17.9 but if we are gonna use build VCS info it's not usefull.

@aschmahmann
Copy link
Contributor Author

LGTM, don't matrix with 1.17.9

We do some via go vet testing https://github.com/ipfs/go-ipfs/blob/master/.github/workflows/golang-analysis.yml#L33-L37, but we can add more in follow up PRs (feel free to submit). Some basic local checking around including modules with generics or leveraging other specific Go 1.18 features shows go1.17.9 vet gives failures though.

but if we are gonna use build VCS info it's not usefull.

We're not using it yet. It'll end up in the 1.18.1 binaries, but we're not explicitly doing any checking like we might want to here in the future.

@aschmahmann aschmahmann force-pushed the chore/update-go-build-version branch from 203886d to 2a1b4d8 Compare May 4, 2022 18:54
@aschmahmann aschmahmann force-pushed the chore/update-go-build-version branch from 2a1b4d8 to 6d2f790 Compare May 4, 2022 18:56
@aschmahmann aschmahmann enabled auto-merge May 4, 2022 18:57
@aschmahmann aschmahmann merged commit 2052809 into master May 4, 2022
@aschmahmann aschmahmann deleted the chore/update-go-build-version branch May 4, 2022 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants