This seems to be because the protocol buffer packages rely on shared state, 
kinda similar to the registration of database drivers in database/sql I would 
say (correct me if I'm wrong). I don't know how you import them, but you 
probably need a way to strictly separate the two in your program (example code 
would help to give more specific advice...).

[Joop Kiefte - Chat @ 
Spike](https://spikenow.com/r/a/?ref=spike-organic-signature&_ts=pgfpn)   
[pgfpn]

On September 30, 2020 at 13:26 GMT, Vasiliy Tolstov <v.tols...@selfip.ru> wrote:

So nobody knows how to deal with this? And if some projects have proto
files with the same name - protobuf always complain about it?

вт, 29 сент. 2020 г. в 10:50, Vasiliy Tolstov <v.tols...@selfip.ru>:
>
> Hi! I have two packages server and client. All belongs to different
> repos. In this packages i have internal/errors dir with errors.proto
> file
> Both of them contains go_package option and package unique
>
> option go_package = "xxx.org/server/internal/errors";
> package server.errors;
>
> option go_package = "xxx.org/client/internal/errors";
> package client.errors;
>
> why program that used client and server in the same time have such message
>
> 2020/09/29 10:50:18 WARNING: proto: file "errors.proto" is already registered
> previously from: ""xxx.org/server/internal/errors"
> currently from: ""xxx.org/client/internal/errors"
> A future release will panic on registration conflicts. See:
> https://developers.google.com/protocol-buffers/docs/reference/go/faq#namespace-conflict
>
> --
> Vasiliy Tolstov,
> e-mail: v.tols...@selfip.ru

--
Vasiliy Tolstov,
e-mail: v.tols...@selfip.ru

--
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CACaajQvaGd8j2MD75EkRvH6zxD89gyKLunxXL6Q5%3DN9VkKWWhQ%40mail.gmail.com.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/c-64693-kfpftudh-sgxfwb%3D1wbic1e%402.gethop.com.

Reply via email to