ptt / pttweb

PTT BBS Web Frontend
http://www.ptt.cc/bbs/
MIT License
211 stars 30 forks source link

Add build instruction and fix protoc make file #18

Open PichuChen opened 3 years ago

PichuChen commented 3 years ago

目前版本不知道從什麼時候開始 proto 會編譯失敗,原先會看到的錯誤訊息有兩項:

--go_out: protoc-gen-go: plugins are not supported; use 'protoc --go-grpc_out=...' to generate gRPC

以及

protoc-gen-go: unable to determine Go import path for "board.proto"

Please specify either:
    • a "go_package" option in the .proto source file, or
    • a "M" argument on the command line.

See https://developers.google.com/protocol-buffers/docs/reference/go-generated#package for more information.

這個 PR 針對這兩項問題進行更新,測試可用的版本資訊如下: $ protoc --version libprotoc 3.17.3 $ go version go version go1.16.2 darwin/amd64 $ protoc-gen-go-grpc --version protoc-gen-go-grpc 1.1.0 $ protoc-gen-go --version protoc-gen-go v1.26.0

另外在 README.md 中新增了如何編譯的指引。