protocolbuffers / protocolbuffers.github.io

Other
38 stars 107 forks source link

Example compile command on page " Protocol Buffer Basics: Python" is incorrect #166

Closed Brick-Bug closed 3 weeks ago

Brick-Bug commented 1 month ago

The command on the page is "protoc -I=$SRC_DIR --python_out=$DST_DIR $SRC_DIR/addressbook.proto"

You can't use -I=$SRC_DIR

Instead it should be -I$SRC_DIR or --proto_path=$SRC_DIR

dannyboywoop commented 1 month ago

Agreed, the command as written contradicts the CLI manual and does not work. The suggested alternative is correct. Here is a link to the problem section on the hosted docs: https://protobuf.dev/getting-started/pythontutorial/#compiling-protocol-buffers

Logofile commented 1 month ago

Thanks for calling out the issue and providing the correction! I'll work on getting this incorporated.

Logofile commented 3 weeks ago

Updated in this PR