Make plugin use betterproto generated classes internally
This means the betterproto plugin no longer needs to depend durectly on protobuf. This requires a small runtime hack to monkey patch some google types to get around the fact that the compiler uses proto2, but betterproto expects proto3. Also: - regenerate google.protobuf package - fix a regex bug in the logic for determining whether to use a google wrapper type. - fix a bug causing comments to get mixed up when multiple proto files generate code into a single python module
This commit is contained in:
@@ -443,9 +443,9 @@ Assuming your `google.protobuf` source files (included with all releases of `pro
|
||||
|
||||
```sh
|
||||
protoc \
|
||||
--plugin=protoc-gen-custom=betterproto/plugin.py \
|
||||
--plugin=protoc-gen-custom=src/betterproto/plugin/main.py \
|
||||
--custom_opt=INCLUDE_GOOGLE \
|
||||
--custom_out=betterproto/lib \
|
||||
--custom_out=src/betterproto/lib \
|
||||
-I /usr/local/include/ \
|
||||
/usr/local/include/google/protobuf/*.proto
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user