Comments (6)
@setpill Were you able to find a workaround for this?
from prototool.
For anyone stumbling across this, protobuf 3.12
required --experimental_allow_proto3_optional
to be passed in for the use of optional
but this flag isn't required from 3.15
onwards. If you set the protoc version to 3.15.8
(latest at the time of writing), prototool
will automatically download it next time it runs and not throw the error above.
While this doesn't solve the problem of passing flags not supported by prototool
to protoc
, it does fix the use of optional
whilst using prototool
.
from prototool.
@AyushSingh13 do you know any workaround for prototool format
?
from prototool.
@AyushSingh13 do you know any workaround for prototool format?
Also interested in this
from prototool.
I have noticed that if you specify a newer version (>=3.15) of protoc
in prototool.yaml
, the verification step that uses protoc
will not fail, but the format fixer will remove the optional attributes.
This is rather unfortunate if the fields are of non-message type and in this case optional is necessary. If you don't have optional
for example The Python generator would rise an error when testing for presence.
ValueError: Can't test non-optional, non-submessage field "MyType.my_filed" for presence in proto3.
from prototool.
I did a bit more reading on this and based on some comments in the buf
repo it seems like the prototool formatter is lossy and probably not a great idea to use anyway. Once of the reasons they haven't implemented a formatter yet.
It looks they're they're planning to work on one soon so hopefully we get a new formatter to use that supports the optional keyword
from prototool.
Related Issues (20)
- Prototool doesn't generate all the needed files for python HOT 1
- version conversion HOT 2
- Update Docker dependencies
- Update grpcurl dependency to fix breakage caused by protobuf v1.4.0 HOT 5
- Go get fails in dockerfile due to envoy dependency HOT 4
- go plugin gogo specified but no import path provided
- Ignore entire directory for linting purposes HOT 2
- Support in Submodule Git Clone
- Prototool v1.10.0 uses go1.12.4
- Missing rationale behind API suffix
- Support Apple arm64 arch HOT 9
- `--config-data` is partial to accepting JSON config data only, and not YAML
- WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested HOT 1
- V2 style guide does not prescribe RPC naming
- protoc-gen-go: plugins are not supported; use 'protoc --go-grpc_out=...' to generate gRPC HOT 3
- Not Able to Run the make proto-refresh
- How to specify a protoc command line argument in prototool.yaml?
- Termination of product development HOT 1
- Announcement: Archival imminent HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from prototool.