Install specific golang version #7
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When using go version higher than 1.15, we see the following errors:
go_benchmarks.go:16:2: no required module provides package golang.org/x/crypto/chacha20poly1305: go.mod file not found in current directory or any parent directory; see 'go help modules'
The reason is that golang/crypto has release version only upto 1.15. Even if we try to use a golang/crypto version higher than that (ex. [internal-branch.go1.17-vendor] when using say go 1.17) then we get the following error:
package command-line-arguments
imports golang.org/x/crypto/chacha20poly1305
golang/go/src/golang.org/x/crypto/chacha20poly1305/chacha20poly1305_generic.go:11:2: use of internal package vendor/golang.org/ x/crypto/internal/subtle not allowed
Ideally the issue is due to the way go.mod is defined and how the golang/crypto doesn't have released versions for versions higher than 1.15.
As an interim workaround, the cf_benchmark repository was last updated 2 years ago, so we found go-1.15 to be the most apt version to use because it also has the compatible golang/crypto - 1.15 release version.