protoc-gen-validate icon indicating copy to clipboard operation
protoc-gen-validate copied to clipboard

[Go] Distinct packages with the same base name result in import naming collisions

Open floating-yuan opened this issue 3 years ago • 2 comments

project structure: image

pay_interface.proto: image

api/pay/v1/enum/enum.proto: image

api/order/v1/enum/enum.proto: image

get errors

/api/pay/v1/pay_interface.pb.validate.go:22:2: enum redeclared as imported package name

image

floating-yuan avatar Dec 08 '21 03:12 floating-yuan

image i just fixed this issue by this way!!

floating-yuan avatar Dec 08 '21 03:12 floating-yuan

Gonna reopen, as this is a real bug we should address in our codegen, and not require users to change an existing package name.

rodaine avatar Dec 08 '21 18:12 rodaine