Comments (8)
There seems to be U+FEFF
, which can be problematic it seems, at the start of the file. Removing it fixes the problem.
$ bat /Users/bojand/Downloads/GHZtest/grpc-proto/src/proto/common/si.proto
───────┬───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
│ File: /Users/bojand/Downloads/GHZtest/grpc-proto/src/proto/common/si.proto
───────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
1 │ <U+FEFF>syntax = "proto3";
2 │
3 │ package proto.common;
4 │
5 │ option java_multiple_files = true;
6 │ option objc_class_prefix = "AAA";
7 │
8 │
9 │ message SI {
10 │ message TAndM {
11 │ string t = 1;
12 │ string m = 2;
13 │ }
14 │
15 │ oneof spec {
16 │ int64 secur_id = 1;
17 │ TAndM t_m = 2;
18 │ }
19 │ }
───────┴───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Also the output argument should specify the actual file and not just a directory.
from ghz.
Hello, unfortunately I do no have Windows or easy access to test on that platform so can't really reproduce if there is an issue related to usage of that OS specifically. However a few things:
message E {
in32 id = 1;
string name = 2;
}
There is a typo there. Type of id
should be int32
instead of in32
The config file specifies the proto
as
C:/Users/1/Desktop/GHZ/protorepo/sr.proto
But you say all proto files are in C:\Users\1\Desktop\GHZ\protorepo\grpc-proto\src\proto\common
while the imports are "proto/common...
and i
is "C:/Users/1/Desktop/GHZ/protorepo/grpc-proto/src/"
. This all is somewhat contradictory and confusing...
Based on the main sr.proto
file is at C:/Users/1/Desktop/GHZ/protorepo/sr.proto
and the contents of it it seems you should have something like:
sr.proto
|-- proto/common/
|-- e.proto
|-- si.proto
We will automatically add the proto file path's directory in import paths, your import paths should just include the location of empty.proto
which should be wherever protoc
is installed.
Finally, you include si.proto
but that proto file doesn't define any messages or calls, so it seems completely redundant.
Hope all of this helps.
from ghz.
sorry, i updated first message to fix typo.
i deleted some info from proto files because they are big.
si.proto - have messages, i just delete them while write this issue because GEinfo dont need the file si.proto and the problem not in message.
but another messages in sr.proto - need it. (i just didnt write it here)
at least the problem is exactly with si.proto referee to error text message.
and import are correctly. i have content somethink like this:
sr.proto
|-- protorepo
|-- sr.proto
|-- grpc-proto
|-- src
|-- proto
|-- common
|-- e.proto
|-- empty.proto
|-- si.proto
also e.proto is correctly imported with no error. because the error exactly in si.proto
and with "i" no problem because ghz find proto files correctly. Just protoc gives error that means that he cant parse si.proto. or i dont know -_-
for the test i add "syntax error" in e.proto in line 3 symbol 5
and when i start ghz - i get error failed to load imports for "e.proto": proto/common/e.proto:3:5: syntax error
also error means si.proto:1:1: - that's means first line first symbol?
also we try this on linux, but the problem are same.
and our programmers can compile proto files with no errors in protoc. They are correct and work good.
from ghz.
Hello, it would be very useful if you could provide a full reproducible example with all the code for all relevant proto files and the structure of folders and ghz
parameters. You can just place dummy / simple, but valid, messages that's similar to your usage. I am having a hard time under standing the structure and relationship of all the protos from all the information above.
from ghz.
Hello. I make example files for you to reproduce my error.
So, i start ghz with command ghz -config .\configtestsr.json
And get error.
failed to load imports for "sr.proto": proto/common/si.proto:1:1: syntax error: unexpected $unk
GHZtest.zip
from ghz.
Also. It worked with protoset.
But still can't make it with path to .proto
from ghz.
Hello, thanks for including the data. Sorry I have not had the time to look into this deeper, but will try to do so soon. Protoset is certainly an option as a workaround if that works for you.
from ghz.
In Windows OS,try using dos2unix to convert to proto file,it works for me!
from ghz.
Related Issues (20)
- How to randomly read data from a file? HOT 1
- Enhanced Error Classification in gRPC APIs
- Template Functions are not showing actual values in influx-details output.
- gRPC python service doesn't work without --proto HOT 3
- parsing of "_" in json-file (proto definitions)?
- Unexpected integer rounding
- How to pass the authorization token as header information HOT 4
- ghz should not include unmarshaling when calculating response time HOT 2
- Grpc-web: rpc error: code = Unavailable desc = connection closed before server preface received HOT 1
- Error "index out of range" when executing CallData.execute
- Feature Request: latency distribution > 99%
- Feature request: incremental statistics during a test run
- balancing grpc
- CVEs: please update google.golang.org/grpc and golang.org/x/net to latest versions HOT 1
- How to combine results of different HandleRPC events?
- go/pkg/mod/github.com/bojand/[email protected]/printer/prometheus.go:16:46: undefined: expfmt.FmtText
- When metadata is "preseeded" (constant per request), ghz adds repeated `grpc-accept-encoding=gzip` headers HOT 1
- Add QUIC protocol support
- Passing int64 losses precision sometimes.
- concurrent map writes
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 ghz.