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

remove golang toolchain as nit fix #1250

Closed

Conversation

SamYuan1990
Copy link
Contributor

by remove golang tool chain from go.mod, try to fix hyperledger/fabric#4951

Signed-off-by: Sam Yuan <yy19902439@126.com>
@SamYuan1990 SamYuan1990 requested a review from a team as a code owner September 19, 2024 15:18
@SamYuan1990 SamYuan1990 marked this pull request as draft September 19, 2024 15:19
@SamYuan1990 SamYuan1990 marked this pull request as ready for review September 19, 2024 15:26
@@ -3,7 +3,7 @@ description: Set up the Test Network Runtime
inputs:
go-version:
description: Version of go
default: '1.22'
Copy link
Member

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.

Copy link
Contributor Author

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
Copy link
Member

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.

@bestbeforetoday
Copy link
Member

@SamYuan1990 I think I removed all the toolchain directives from go.mod files in PR #1260.

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.

deploy chaincode problem
2 participants