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

Repo organization incompatible with go dep #116

Closed
dpetersen opened this issue Dec 25, 2017 · 3 comments
Closed

Repo organization incompatible with go dep #116

dpetersen opened this issue Dec 25, 2017 · 3 comments

Comments

@dpetersen
Copy link

Hey, thanks for this project, it looks very cool!

This issue isn't as much a defect in grpc-web as a gotcha that others may encounter. I am using dep, which is (maybe, someday) an official golang tool for managing dependencies. It's unfinished, but I would imagine it's gaining popularity as it is an official tool.

Unfortunately, dep doesn't like the atypical structure of this repository, due to the lack of go code at its root. There is a Github issue open about this general problem. They're not against fixing it, but it's not fixed yet. For new grpcweb users, the really sinister problem is that dep trolls through tags and branches trying to find go code, and for me it landed on a branch from February 2017 (when the repo did have go code at the root). Needless to say, it didn't work well as I followed your current documentation against an old version of the library.

For other people who might have this issue in the future, the only workaround I could see was to:

  1. go get this repository.
  2. Move it into my vendor folder (because vendored dependencies have their import paths rewritten and so your vendored grpc.Server is not technically the same type as the unvendored grpcweb pacakge expects).

That's not a very good fix, but it got me moving forward in evaluating this project. You're free to close this issue if you'd like, but hopefully I'll save other people some frustration.

@easyCZ
Copy link
Contributor

easyCZ commented Dec 25, 2017

Hi @dpetersen, thanks for raising. I'll have a think about how we could restructure the repository to prevent this from happening. This will most likely only happen in January, however.

Do you have any suggestions on the structure?

@dpetersen
Copy link
Author

I'm unconvinced you should change anything. It's a recognized shortcoming of dep that will likely be fixed. Your project organization isn't wrong; it's just atypical. If you move the go code now, it will break for anyone who's importing it.

I only created this issue to point out the problem to other people who might encounter it. For what it's worth, I had further trouble with dep on another package (Kubernetes' client-go, which is admittedly complicated) and switched back to glide for dependency management. It vendors this project just fine.

@easyCZ
Copy link
Contributor

easyCZ commented Feb 18, 2018

Will close for now as it doesn't seem there is anything we can do to solve this.

@easyCZ easyCZ closed this as completed Feb 18, 2018
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

2 participants