Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix protobuf regeneration script. (#5291)
release/v20.03-specific change: use dgo/v2 instead of dgo/v200. This fixes the make regenerate command that should create the generated protobuf code. 1. make regenerate fails to run (error log attached in PR) 2. The protobuf dependencies are unintentionally updated to the latest version. 3. It was referencing protobuf definitions from GOPATH. So, if a package was not updated to the right version (e.g., updating github.com/dgraph-io/badger to the latest master), then there could be errors like the following when referencing the wrong version of a proto: pb.proto:285:18: "badgerpb2.KV" is not defined. pb.proto:297:11: "badgerpb2.KV" is not defined. pb.proto:545:5: "badgerpb2.KVList" is not defined. pb.proto:537:60: "badgerpb2.KVList" is not defined. pb.proto:28:1: warning: Import github.com/dgraph-io/badger/pb/pb.proto is unused. Changes * Include proto path /usr/local/include in protoc command to fix (1). * Update depcheck.sh to check that this directory exists. Error out with installation instructions otherwise if it's missing. * Install protobuf libraries from the versions in go.mod, and use go install instead of go get so the protobuf versions aren't updated automatically to fix (2). * Copy to temporary directory for proper import paths from go mod versions to remove any dependencies on $GOPATH to fix (3). * protos from proto library * proto from badger * proto from dgo * Regenerate protos
- Loading branch information