Fantom-foundation / go-lachesis

aBFT consensus for permission-less networks
https://fantom.foundation
MIT License
220 stars 77 forks source link

Generation of event.pb.go requires modification to compile #82

Closed AgustinCB closed 4 years ago

AgustinCB commented 5 years ago

To Reproduce Steps to reproduce the behavior:

  1. Run protoc --proto_path=src/poset/ --go_out=paths=source_relative:./src/poset src/poset/*.proto to compile the protobuffer files
  2. Try to compile: make build
  3. See error

Expected behavior The generation of go code should compile.

Additional context The problem is that Event requires a protobuffer message in another package, Peer. In order to make it compile, it's necessary to add github.com/andrecronje/lachesis/src/peers as an import and then substitute all the Peer with peers.Peer in the file event.pb.go. Because Peer it's also sent, we have a peer.proto file, but it's in the poset package.

Possible solution to try:

  1. Move the peer.proto file to src/peers.
  2. Run protoc --proto_path=src/poset/ --proto_path=src/peers/ --go_out=paths=source_relative:./src/poset src/poset/*.proto.
  3. Check to see if it compiles now.
devintegral commented 4 years ago

outdated