Comments (16)
Actually I think the problem here is additional_bindings.post
and additional_bindings.body
, these should be inside a additional_bindings { ... }
block. I think that there may be an issue with both this repository and Prototool in this case.
from proto.
using this test
func TestParseNestedSelectorInAggregatedConstant(t *testing.T) {
src := `rpc Test(Void) returns (Void) {
option (google.api.http) = {
get: "/api/v1/test"
additional_bindings.post: "/api/v1/test"
additional_bindings.body: "*"
};
}`
p := newParserOn(src)
rpc := new(RPC)
p.next()
err := rpc.parse(p)
if err != nil {
t.Fatal(err)
}
}
i cannot reproduce this problem.
what version of the package is used by prototool?
from proto.
Prototool is using commit ff6be38 which is one commit back.
from proto.
See my last comment on uber/prototool#27
from proto.
can you have a look at the PR? I think it solves this issue
from proto.
I don't this this is fixed =-#81 did not add any testing for this. Can you check this? This also introduced a usage bug in #82.
Update: I see the testing and just added to it, the usage bug remains though, put up #83 to fix.
from proto.
What is the status of this issue?
from proto.
Reading this again, the only problem I see above is that it is invalid Protobuf - additional_bindings.post
is not valid. I'm working on fixing the nested options problem in Prototool now. I don't see the problem with the semicolon, can you explain?
from proto.
test.proto:7:44:1:1:Error while parsing option value for "http": Expected "{", found ".".
is due to the invalid nature of additional_bindings.post
I believe.
from proto.
I think I got it wrong in the description, the dots are causing the problem, as you say.
from proto.
Hey folks - I believe I have another issue that may fit into this category.. when parsing a message like:
message AccountDirectory {
option (common.ui_msg_desc) =
"Account directory associates sites to providers like Accounts, CRM and Loyalty";
int64 id = 1 [
(common.ui_field_name) = "Account Directory ID",
(common.ui_field_desc) = "ID of the account directory record."
];
string name = 2 [
(common.field_len) = 80,
(common.ui_field_name) = "Account Directory Name",
(common.ui_field_desc) =
"Full name of the account directory (e.g., TEAM-NAME-USER-ACCT-DIR).",
(validate.rules).string = {min_len : 3, max_len : 80}
];
string description = 3 [
(common.field_len) = 400,
(common.ui_field_name) = "Account Domain Description",
(common.ui_field_desc) = "Description of the account domain (e.g. Team,"
"Name User Account Directory).",
(validate.rules).string = {min_len : 3, max_len : 400}
];
AccountDomain account_domain = 4 [
(common.ui_field_name) = "Account Domain",
(common.ui_field_desc) = "Associated account domain identifier."
];
}
I get a parse error e.g.
<input>:54:30: found "\"Name User Account Directory).\"" but expected [option ,]
It seems that the parse step has an issue with lines being separated by the clang-format
tool? I could be off with my assumption, but I was hoping this would add some context to this issue.
from proto.
@nilslice , thank you for reporting this
from proto.
see #85
from proto.
#85 fixes my reported issue. Thank you!
from proto.
can this issue be closed?
from proto.
I do think this is fixed.
from proto.
Related Issues (20)
- 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
- EnumField does not implement elementContainer and so its Elements are missed in Walk HOT 2
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.