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

#293 Ambiguous import issues when pinning grpc to <v1.30 #377

Closed
drewwells opened this issue Jan 4, 2021 · 1 comment · Fixed by #381
Closed

#293 Ambiguous import issues when pinning grpc to <v1.30 #377

drewwells opened this issue Jan 4, 2021 · 1 comment · Fixed by #381

Comments

@drewwells
Copy link
Contributor

google.golang.org/grpc v1.30+ broke a lot of contracts. As a result, we have been unable to upgrade to it and are stuck on v1.29.1. I'm seeing issues importing go-grpc-middleware, after some digging the issues are related to these changes #293. The test example is using google.golang.org/grpc/examples which imports bleeding edge grpc so we can not import it.

Could we stand up our own example proto to perform these simple tests? It will make this project more portable and support us poor saps unable to upgrade grpc.

Here's the error from go mod tidy

        github.com/infobloxopen/atlas-claims imports
        github.com/grpc-ecosystem/go-grpc-middleware/auth tested by
        github.com/grpc-ecosystem/go-grpc-middleware/auth.test imports
        google.golang.org/grpc/examples/helloworld/helloworld: ambiguous import: found package google.golang.org/grpc/examples/helloworld/helloworld in multiple modules:
        google.golang.org/grpc v1.34.0 (/home/drew/pkg/mod/google.golang.org/grpc@v1.29.1/examples/helloworld/helloworld)
        google.golang.org/grpc/examples v0.0.0-20201209011439-fd32f6a4fefe (/home/drew/pkg/mod/google.golang.org/grpc/examples@v0.0.0-20201209011439-fd32f6a4fefe/helloworld/helloworld)

Related #293

@johanbrandhorst
Copy link
Collaborator

So we're depending transitively on bleeding edge grpc because we import the examples, which is its own module, which imports bleeding edge grpc? What a mess. Sounds like we should remove whatever example import we're depending on. Could you help get that done?

drewwells added a commit to drewwells/go-grpc-middleware that referenced this issue Jan 16, 2021
    Refactors tests code to use local protobufs to avoid
    importing grpc/examples. This package uses bleeding
    edge grpc forcing dependent packages to import the
    latest grpc.

    fixes grpc-ecosystem#377
drewwells added a commit to drewwells/go-grpc-middleware that referenced this issue Jan 16, 2021
    Refactors test code to use local protobufs instead of
    importing grpc/examples. examples package uses bleeding
    edge grpc forcing the pulling of bleeding edge grpc

fixes grpc-ecosystem#377
bwplotka pushed a commit that referenced this issue Jan 17, 2021
Refactors test code to use local protobufs instead of
    importing grpc/examples. examples package uses bleeding
    edge grpc forcing the pulling of bleeding edge grpc

fixes #377
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

Successfully merging a pull request may close this issue.

2 participants