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

updated dependency from github.com/hyperledger/fabric-protos-go v0.3.0 to to github.com/hyperledger/fabric-protos-go-apiv2 v0.3.0 #83

Closed
wants to merge 7 commits into from

Conversation

tobigiwa
Copy link

Resolves #80

…0 to github.com/hyperledger/fabric-protos-go-apiv2 v0.3.0
This commit contains dependency update from fabric-protos-go to fabric-protos-go-apiv2 (Resolves hyperledger#80) and "github.com/golang/protobuf"(deprecated) to "google.golang.org/protobuf". The changes in this commit are localised in the "shim folder" only and they include:

"github.com/golang/protobuf/proto" --> "google.golang.org/protobuf/proto"

pb "github.com/hyperledger/fabric-protos-go/peer" --> pb "github.com/hyperledger/fabric-protos-go-apiv2/peer"

"github.com/golang/protobuf/ptypes/timestamp" --> timestamp "google.golang.org/protobuf/types/known/timestamppb"

"github.com/hyperledger/fabric-protos-go/ledger/queryresult" --> "github.com/hyperledger/fabric-protos-go-apiv2/ledger/queryresult"

peerpb "github.com/hyperledger/fabric-protos-go/peer" --> peerpb "github.com/hyperledger/fabric-protos-go-apiv2/peer"

"github.com/hyperledger/fabric-protos-go/common" --> "github.com/hyperledger/fabric-protos-go-apiv2/common"

now := ptypes.TimestampNow() --> now := timestamp.Now()

Import aliases are kept as it was so as not to affect the source code. I believe that are as far as the shim folder dependency is concerned.

Signed-off-by: tobigiwa <giwaoluwatobi@gmail.com>
Signed-off-by: tobigiwa <giwaoluwatobi@gmail.com> This commit contains dependency update from fabric-protos-go to fabric-protos-go-apiv2 (Resolves hyperledger#80) and "github.com/golang/protobuf"(deprecated) to
"google.golang.org/protobuf". The changes in this commit are localised in the "shim folder" only and they include:
"github.com/golang/protobuf/proto" --> "google.golang.org/protobuf/proto"#
pb "github.com/hyperledger/fabric-protos-go/peer" --> pb "github.com/hyperledger/fabric-protos-go-apiv2/peer"#
"github.com/golang/protobuf/ptypes/timestamp" --> timestamp "google.golang.org/protobuf/types/known/timestamppb"# "github.com/hyperledger/fabric-protos-go/ledger/queryresult" -->
"github.com/hyperledger/fabric-protos-go-apiv2/ledger/queryresult" peerpb "github.com/hyperledger/fabric-protos-go/peer" --> peerpb "github.com/hyperledger/fabric-protos-go-apiv2/peer"
"github.com/hyperledger/fabric-protos-go/common" --> "github.com/hyperledger/fabric-protos-go-apiv2/common" now := ptypes.TimestampNow() --> now := timestamp.Now()
Import aliases are kept as it was so as not to affect the source code. I believe that are as far as the shim folder dependency is concerned.
Signed-off-by: tobigiwa <giwaoluwatobi@gmail.com> This commit contains dependency update from fabric-protos-go to fabric-protos-go-apiv2 (Resolves hyperledger#80) and "github.com/golang/protobuf"(deprecated) to
"google.golang.org/protobuf". The changes in this commit are localised in the "pkg folder" only and they include:
"github.com/golang/protobuf/proto" --> "google.golang.org/protobuf/proto"# (use "git push" to publish your local commits)
pb "github.com/hyperledger/fabric-protos-go/peer" --> pb "github.com/hyperledger/fabric-protos-go-apiv2/peer"# "github.com/hyperledger/fabric-protos-go/ledger/msp" -->
"github.com/hyperledger/fabric-protos-go-apiv2/ledger/msp" "github.com/hyperledger/fabric-protos-go/common" --> "github.com/hyperledger/fabric-protos-go-apiv2/common"
Import aliases are kept as it was so as not to affect the source code. I believe that are as far as the pkg folder dependency is concerned.
Removed deprecated package as direct dependency("github.com/golang/protobuf") and bumped up "github.com/hyperledger/fabric-protos-go" to github.com/hyperledger/fabric-protos-go-apiv2.  Ran `go get -u github.com/hyperledger/fabric-protos-go@none` and ran `go mod tidy`. It can be noticed that package "github.com/golang/protobuf" is still an indirect dependency used by google.golang.org/grpc/credentials v1.53.0, even the latest update v1.58.0 still does. This issue is from hyperledger#80.

Signed-off-by: tobigiwa <giwaoluwatobi@gmail.com>
changes:
1)  The "AssertProtoEqual" was borrowed from: // https://github.com/hyperledger/fabric-gateway/blob/cd1bc1f3fcf007bd97244120d9a8d112153322cd/pkg/internal/test/transaction.go#L20-L22
which is more apt to test the protobufs of google.golang.org/protobuf/ implementation.

2) Also, added "\u00a0" has it was produced from the unmarshling of two functions

Finally, Resolves hyperledger#80.

Signed-off-by: tobigiwa <giwaoluwatobi@gmail.com>
@tobigiwa tobigiwa requested a review from a team as a code owner September 16, 2023 20:42
@tobigiwa tobigiwa closed this Sep 16, 2023
@tobigiwa tobigiwa deleted the update-dependency branch September 16, 2023 20:57
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.

Update from fabric-protos-go to fabric-protos-go-apiv2
1 participant