You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What operating system (Linux, Windows, …) and version?
Linux 6.6.4-arch1-1
What did you do?
I have multiple protos defined in a git repo and the generated code is in this repo as well and I use it to import the functionality into the server and clients.
Inside some of them have a protofile called shared (its only used inside the domain and not shared with the others.)
When I have a client application that use all of the protos I get a panic, but I managed to reduce it to a warning after reading the FAQ in the error message.
I have even namespaced the package name in the proto - for instance:
❯ GOLANG_PROTOBUF_REGISTRATION_CONFLICT=warn go run ./cmd
WARNING: proto: file "shared.proto" is already registered
previously from: "github.com/dk-slack/protos/events_service/golang/shared"
currently from: "github.com/dk-slack/protos/member_service/golang/shared"
See https://protobuf.dev/reference/go/faq#namespace-conflict
WARNING: proto: file "admin.proto" is already registered
previously from: "github.com/dk-slack/protos/events_service/golang/admin"
currently from: "github.com/dk-slack/protos/member_service/golang/admin"
See https://protobuf.dev/reference/go/faq#namespace-conflict
The text was updated successfully, but these errors were encountered:
What version of gRPC are you using?
1.59.0
What version of Go are you using (
go version
)?1.21.4
What operating system (Linux, Windows, …) and version?
Linux 6.6.4-arch1-1
What did you do?
I have multiple protos defined in a git repo and the generated code is in this repo as well and I use it to import the functionality into the server and clients.
├── events_service
│ ├── admin.proto
│ ├── golang
│ │ ├── admin
│ │ │ ├── admin_grpc.pb.go
│ │ │ └── admin.pb.go
│ │ ├── generate.sh
│ │ ├── go.mod
│ │ ├── go.sum
│ │ ├── shared
│ │ │ └── shared.pb.go
│ │ └── user
│ │ ├── user_grpc.pb.go
│ │ └── user.pb.go
│ ├── shared.proto
│ └── user.proto
├── mailbox_service
│ ├── admin.proto
│ ├── golang
│ │ ├── admin
│ │ │ ├── admin_grpc.pb.go
│ │ │ └── admin.pb.go
│ │ ├── generate.sh
│ │ ├── go.mod
│ │ └── user
│ │ ├── user_grpc.pb.go
│ │ └── user.pb.go
│ └── user.proto
├── member_service
│ ├── admin.proto
│ ├── golang
│ │ ├── admin
│ │ │ ├── admin_grpc.pb.go
│ │ │ └── admin.pb.go
│ │ ├── generate.sh
│ │ ├── go.mod
│ │ ├── registration
│ │ │ ├── registration_grpc.pb.go
│ │ │ └── registration.pb.go
│ │ ├── shared
│ │ │ └── shared.pb.go
│ │ └── statistics
│ │ ├── statistics_grpc.pb.go
│ │ └── statistics.pb.go
│ ├── registration.proto
│ ├── shared.proto
│ └── statistics.proto
└── README.md
They are not related to eachother.
Inside some of them have a protofile called shared (its only used inside the domain and not shared with the others.)
When I have a client application that use all of the protos I get a panic, but I managed to reduce it to a warning after reading the FAQ in the error message.
I have even namespaced the package name in the proto - for instance:
What did you expect to see?
Nothing, no warning and no errors.
What did you see instead?
After running this:
The text was updated successfully, but these errors were encountered: