Thank You for reply.
I already figured out this stuff. Real problem was/is in VS Code terminal.
When i run protoc command from VS Code there is some issue with imports ...
or not sure with what exactly.
When no .proto imports are used, VS Code terminal was working just great
with protoc.
But after i included some .proto imports from other directories i get that
proto-gen-go error listed above.
So at the end i tried to run the same command from CMD and PowerShell stand
alone terminals and it works just great.
So, the issue is related to VS Code.
My Environment Variables are set correctly.
On Tuesday, August 28, 2018 at 10:42:17 PM UTC+3, Feng Xiao wrote:
>
> I have written some explanation of protoc "-I" flag and import path here:
> https://github.com/xfxyjwf/protobuf/blob/protoc/docs/protoc.md
>
> To run protoc correctly:
> 1. Determine the import path for every one of your .proto files. In your
> case, I think it should be "dms/v1/dms.proto" and "metric/protobuf.proto".
> 2. Use the chosen import paths in all your .proto files. E.g., change your
> dms.proto to use 'import "metric/protobuf.proto";' instead.
> 3. Construct "--proto_path" arguments where protoc can find the imported
> files using the chosen import paths. In your case, it should be "-I." which
> can be omitted because it's the default.
>
> Putting everything together:
> a. change dms.proto to do 'import "metric/protobuf.proto";'
> b. run 'protoc dms/v1/dms.proto --go_out=..."
>
> and it should work.
>
> The other error:
> --go_out: protoc-gen-go: The system cannot find the file specified.
>
> is about missing the go protoc plugin. You should be able to fix that by
> installing the right plugin and make sure it can be found in PATH. If in
> doubt, check:
>
> $ which protoc-gen-go
>
> If it prints nothing, your go protoc plugin is not installed correctly.
>
> On Tue, Aug 28, 2018 at 5:05 AM Dzintars Klavins > wrote:
>
>> And when i am using:
>>>
>>
>> protoc --proto_path=dms/v1 dms.proto --go_out=plugins=grpc:D:\Code\Go\src
>>
>>
>> i get a error:
>>
>> protobuf.proto: File not found.
>> dms.proto: Import "protobuf.proto" was not found or had errors.
>> dms.proto:17:66: "domain.protobuf.Empty" is not defined.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Protocol Buffers" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to protobuf+u...@googlegroups.com .
>> To post to this group, send email to prot...@googlegroups.com
>> .
>> Visit this group at https://groups.google.com/group/protobuf.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
--
You received this message because you are subscribed to the Google Groups
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.