-
Notifications
You must be signed in to change notification settings - Fork 387
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
WKT related error in GoogleCloudPlatform/google-cloud-go #224
Comments
Thanks for reporting this. I wasn't able to reproduce this with the example you gave though. I don't have the GCP SDK set up on my machine, so I just get an error like this when creating the client:
Without being able to reproduce, I'm not sure exactly what's breaking for you. I suspect that multiple packages with the same As an experiment, what happens if you replace the
|
There's no way to do this, currently. It would only be safe to do this in builds that don't include This is causing other problems though. Gazelle only has special cases for the WKTs. Vendoring other libraries in the same repos may also cause problems. I'd like to confirm this is the cause of the crash you're seeing before deciding on a solution though. |
Thank you!
Your patch works perfectly, there are no errors.
I agree with you. When I downgrade gazelle to version 0.10.0 that does not support WKT replacing, following errors are displayed:
I understood this problem can be resolved by editing each vendor's BUILD.bazel with |
Great! I'm glad that worked. A similar issue was brought up in #219 as well. I think the solution to this will be:
|
Ok, this should be fixed at tip of master. There are basically two ways to get this to build: Using pre-generated protosApply this patch:
This will disable all proto-related special cases in Go dependency resolution. You'll build this binary like a normal Go binary without any proto code generation at build time. Using build-time generated proto codeApply this patch instead:
This does several things:
|
See bazel-contrib/rules_go#1548 for more info on recent proto dependency changes. |
I found a bug caused by resolving behavior of gazelle's WKT.
googleapis/google-cloud-go#1017
In bazel with gazelle environment, vendored google's sdk that is using grpc fails to run because google's pre-compiled proto files depends on vendored
github.com/golang/protobuf/proto/ptypes/*
.Is there any way to disable or exclude WKT resolving in vendored packages?
Here is code to reproduce.
Error Output:
The text was updated successfully, but these errors were encountered: