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

Update to Go 1.17 #3321

Merged
merged 3 commits into from
Sep 8, 2021
Merged

Update to Go 1.17 #3321

merged 3 commits into from
Sep 8, 2021

Conversation

antgamdia
Copy link
Contributor

@antgamdia antgamdia commented Aug 28, 2021

Description of the change

This PR updates to Go 1.17, the main change is that the indirect dependencies have now their own block (https://golang.org/doc/go1.17#go-command).

Benefits

Use the latest version

Possible drawbacks

N/A (go doesn't break backward compatibility)

Applicable issues

N/A

Additional information

The official (Bitnami) images should also be updated. Marking as draft PR in the meanwhile.

Edit: also getting this CI error:

------
 > [builder 11/12] RUN --mount=type=cache,target=/go/pkg/mod     --mount=type=cache,target=/root/.cache/go-build     go build     -o /fluxv2-packages-v1alpha1-plugin.so -buildmode=plugin     ./cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/*.go:
#21 1.896 # github.com/cespare/xxhash/v2
#21 1.896 asm: xxhash_amd64.s:120: when dynamic linking, R15 is clobbered by a global variable access and is used here: 00092 (/go/pkg/mod/github.com/cespare/xxhash/[email protected]/xxhash_amd64.s:120)	ADDQ	R15, AX
#21 1.896 asm: assembly failed
------
executor failed running [/bin/sh -c go build     -o /fluxv2-packages-v1alpha1-plugin.so -buildmode=plugin     ./cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/*.go]: exit code: 2
make: *** [Makefile:26: kubeapps/kubeapps-apis] Error 1

Signed-off-by: Antonio Gamez Diaz <[email protected]>
@antgamdia
Copy link
Contributor Author

More updates here (at some point we might want to move to Go 1.17, especially for the new dependency format -explicit differentiation direct vs indirect ones, plus "the performance improvement due to the new register-based calling convention. Your CPU-bound programs will magically get 5% faster when compiled with 1.17")

Due to this register-based calling, when dynamically linking files and error popped up (fixed at golang/go@c870e86). However, one of the libraries, xxhash, still relied on the R15 registry (cespare/xxhash#54). Fortunately, they released a fix for that cespare/xxhash@b2091fe and got released in https://github.com/cespare/xxhash/releases/tag/v2.1.2

Checking if I can upgrade this dependency to the proper version

@antgamdia antgamdia marked this pull request as ready for review September 7, 2021 11:38
Copy link
Contributor

@absoludity absoludity left a comment

Choose a reason for hiding this comment

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

Sweet, looks good to go!

@antgamdia antgamdia merged commit 5c1d328 into vmware-tanzu:master Sep 8, 2021
@antgamdia antgamdia deleted the updateGo1.17 branch September 8, 2021 07:27
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.

2 participants