Comments (12)
thank you for reporting this. I will include it in my tests and work on a fix
from proto.
I fixed the reported one but found another issue at line 115. I wonder whether the source is correct as the identifier has a whitespace between repeated
and .min_items
:
repeated core.DataSource keys = 1 [(validate.rules).repeated .min_items = 1];
``
from proto.
if this is correct then should the first option be interpreted as (validate.rules).repeated = true
?
from proto.
These are very strange, where do people find out these weird strange cases on protobuf?
I don't really use envoy, I got this error while trying my library on all proto files I could find.
Maybe the protobuf BNF file can help?
from proto.
I found these options come from here:
https://github.com/lyft/protoc-gen-validate/blob/master/validate/validate.proto
But I don't see anything different in it than in other proto files...
from proto.
Someone pointed me to
https://developers.google.com/protocol-buffers/docs/reference/proto2-spec
https://developers.google.com/protocol-buffers/docs/reference/proto3-spec
it says
fieldOption = optionName "=" constant
Now, I am looking for the validate.proto to see it definition
from proto.
https://github.com/lyft/protoc-gen-validate/blob/master/validate/validate.proto
from proto.
In that definition, I read message RepeatedRules
and based on this I conclude this is actually a syntax error on their part.
from proto.
(Removed the last comment, was an error on the proto file itself.)
from proto.
Other problem with this field:
Location home = 4 [(validate.rules).message.required = true];
The parser considers "message" a reserved word, but it isn't on this context.
2018/03/15 17:08:37 <input>:15:39: found "message" but expected [option postfix identifier]
from proto.
see #72 that fixes this too
from proto.
Seems fine to me!
from proto.
Related Issues (20)
- Unable to parse simple protobuf file with imported options HOT 12
- Package name with "." causes issues when parsing HOT 1
- Issue with double-quoted options HOT 1
- Quote dropped in option parsing
- Missing semicolon at end silently ignored. HOT 1
- Quoted string constant
- Multi-line fields not parseable
- QuoteRune is a breaking change HOT 4
- Write proto struct to file? HOT 1
- Comments inside field options break parser HOT 2
- Nested enum with inline comments break parser HOT 5
- Infinite loop in Parser.Parse() HOT 2
- Sir, if I get the package field? HOT 3
- support proto3 presence HOT 1
- Field type with keyword is not correctly parsed HOT 3
- Option string values parsed as numbers HOT 8
- embedded comment parse fail HOT 7
- Parse failure on negative reserved enums HOT 4
- Boolean variable to test if a field is deprecated HOT 11
- Parsing comments inside an array in an Option HOT 4
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 proto.