grpc-ecosystem / grpc-ecosystem/polyglot
--proto_path error since 1.6.0
- Dominant language
- Java
- Stars
- 535
- Forks
- 59
- PR merge metrics
- No merged PRs in 30d
Description
I updated today to 2.0.0 and since version 1.6.0 I get this error for this command
```
java -jar polyglot.jar --proto_discovery_root=build/extracted-include-protos/main call --endpoint=wn000280:18181 --full_method='api.v1.DataService/ListInstruments' <<< '{"parent":"references/instruments"}'
```
```
C:\cygwin64\home\mrt181\sourcecode\api-service\build\extracted-include-protos\main\google\protobuf\struct.proto: Input is shadowed in the --proto_path by "C:/cygwin64/tmp/polyglot-well-known-types1930180195804578592/google/protobuf/struct.proto". Either use the latter file as your input or reorder the --proto_path so that the former file's location comes first.
```
I can fix this by deleting this directory:
`C:\cygwin64\home\mrt181\sourcecode\api-service\build\extracted-include-protos\main\google`
because polyglot includes it in the polyglot-well-known-types. But that directory is regenerated by my build jobs.
So I tried to run this instead:
```
java -jar polyglot.jar --proto_discovery_root=build/extracted-include-protos/main/api call --endpoint=wn000280:18181 --full_method='api.v1.DataService/ListInstruments' <<< '{"parent":"references/instruments"}'
```
to only use my protos and the well-known ones but this gives me this error:
```
api/trading/v1/type/instrument.proto: File not found.
trading/v1/response/list_instruments_response.proto: Import "api/trading/v1/type/instrument.proto" was not found or had errors.
trading/v1/response/list_instruments_response.proto:11:14: "Instrument" is not defined.
```
`list_instruments_response.proto` has this import
```
import "api/trading/v1/type/instrument.proto";
```
How can I exclude the usage of the well-known-types?
I pull them in myself because I need those
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.