-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
remove golang toolchain as nit fix #1250
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Sam Yuan <yy19902439@126.com>
@@ -3,7 +3,7 @@ description: Set up the Test Network Runtime | |||
inputs: | |||
go-version: | |||
description: Version of go | |||
default: '1.22' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the Go version was intentionally moved to 1.22 since 1.21 is no longer supported since Go 1.23 was released. See the Go release policy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point, how about we upgrade go mod files into golang 1.22?
@@ -2,8 +2,6 @@ module github.com/hyperledger/fabric-samples/asset-transfer-basic/chaincode-go | |||
|
|||
go 1.21 | |||
|
|||
toolchain go1.22.4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I caused this when I bulk updated dependencies to the v2 chaincode APIs. By default the go mod
command sets the toolchain to the specific Go version is used to run the command, which might impose more restrictive version constraints than the go
directive.
In other repositories we have been taking the approach of avoiding a toolchain
directive but specifying a full (3-digit) version for the go
directive. For current Go versions, the go
version is used as the toolchain
if no toolchain is specified, and toolchain must be a full (3-digit) Go version. That might be the right thing to do here too.
by remove golang tool chain from go.mod, try to fix hyperledger/fabric#4951