Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get "protoc-gen-gogo: error:inconsistent package import paths" errors #220

Open
floating-yuan opened this issue Dec 7, 2021 · 0 comments

Comments

@floating-yuan
Copy link

project structure:
BC350AA55EFD7786F986541542D4A686

shop/v1/shop.proto:
63103E5C561DD1CAA53D0785AE0B31A2

shop/v1/service/shop.proto:
CDFBE1E8BAE14E1B25FD67A30DA038B6

protoc cmd:

protoc --proto_path=. \
        --proto_path=./third_party \
         --go_out=paths=source_relative:. \
     --gorm_out=paths=source_relative:. \
     --validate_out=paths=source_relative,lang=go:. \
         --go-http_out=paths=source_relative:. \
         --go-grpc_out=paths=source_relative:. \
   --openapiv2_out . \
    --openapiv2_opt logtostderr=true \
    --openapiv2_opt json_names_for_fields=false \
        $(shell find api/shop -name *.proto)

will get this errors:

protoc-gen-gogo: error:inconsistent package import paths: "my.example-domain.com/api/shop/v1", "my.example-domain.com/api/shop/v1/service"
--gorm_out: protoc-gen-gorm: Plugin failed with status code 1.

if delete --gorm_out=paths=source_relative:. \ this line in protoc cmd. it will works fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant