hyperledger / hyperledger/fabric-protos

Update go package names to hyperledger/fabric-protos-go-apiv2

Open
#225 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
Protocol Buffer
Stars
43
Forks
75
Avg merge
16h 55m
Merged PRs (30d)
5

Description

I believe `https://github.com/hyperledger/fabric-protos-go` is deprecated, and `https://github.com/hyperledger/fabric-protos-go-apiv2` is the latest fabric-protos-go package.
Hence this needs to be updated in all `.proto` definitions as:
```
option go_package = "github.com/hyperledger/fabric-protos-go-apiv2";
```

This is so that if some other's project's `.proto` depends upon fabric-protos, then on compiling it created dependency to deprecated version i.e. `github.com/hyperledger/fabric-protos-go`, which then later on create conflicts with go applications depending on this proto and fabric-protos.
I'm a maintainer/co-owner of Hyperledger/Cacti, where we are facing this issue.

I've a bash script to do this (which is what I'm using for workaround), if you are okay with it, I can create PR for this.

script:

Script



#!/bin/bash

ROOT_DIR=${1:-'..'}

pushd $ROOT_DIR
files=$(find ./fabric-protos -name *.proto)

for filename in $files
do
sed -i'.scriptbak' -e ' s#^option go_package = "github.com/hyperledger/fabric-protos-go/#option go_package = "github.com/hyperledger/fabric-protos-go-apiv2/#' "$filename"
rm -rf $filename.scriptbak
cat $filename | grep "option go_package"
done
popd $ROOT_DIR


Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.