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

bump up to golang 1.23 version #206

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
module github.com/hyperledger/fabric-admin-sdk

go 1.21
go 1.23
Copy link
Member

Choose a reason for hiding this comment

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

We should not move the minimum required Go version beyond 1.22 while 1.22 is still a supported Go version

Copy link
Member

Choose a reason for hiding this comment

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

I suspect that having a 2-digit go directive and no toolchain directive will cause problems for consumers. I think we don't see that in our tests since the e2e tests are within the same module so do not exercise the API in the same way that an end user would.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok, I will update to go 1.22 later.

Copy link
Member

Choose a reason for hiding this comment

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

The go.mod is only really supposed to be updated using the go CLI commands now. To update the Go version to 1.22 with no automatically added toolchain directive, you probably need go get [email protected] toolchain@none. See the Go Toolchains documentation; particularly the Managing Go version module requirements with go get section.


require (
github.com/IBM/sarama v1.43.1
github.com/Knetic/govaluate v3.0.0+incompatible
github.com/golang/mock v1.1.1
Copy link
Member

Choose a reason for hiding this comment

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

We should be using go.uber.org/mock instead of the (deprecated) github.com/golang/mock

Copy link
Contributor Author

Choose a reason for hiding this comment

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

graph.txt
I don't know why but... it seems that we have github.com/golang/mock as a part of go mod, after go mod tidy so I am going to use

go mod edit -replace=github.com/golang/[email protected]=github.com/uber-go/[email protected]

to apply go.uber.org/mock

Copy link
Member

Choose a reason for hiding this comment

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

I don't see that behaviour. I wonder if you have locally some generated mocks that were created using github.com/golang/mock? If you get rid of the generated mocks, either with find . -name '*_mock_test.go' -delete -print or git clean -xdf, then run make generate again, you should get mocks only using go.uber.org/mock.

From this clean state, running either go get ./... or go mod tidy should produce no changes to the go.mod and go.sum files.

github.com/grpc-ecosystem/go-grpc-middleware v1.4.0
github.com/hashicorp/go-version v1.6.0
github.com/hyperledger/fabric-gateway v1.5.0
Expand Down
1 change: 1 addition & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
github.com/golang/mock v1.1.1 h1:G5FRp8JnTd7RQH5kemVNlMeyXQAztQ3mOWV95KxsXH8=
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
Expand Down