-
Notifications
You must be signed in to change notification settings - Fork 385
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
no such target '@com_github_envoyproxy_protoc_gen_validate//validate:validate' #988
Comments
Setting
|
Sorry to be slow to get back to this. Could you confirm whether there are build files in that repo and which naming convention is used? It would help narrow this down. You can see Bazel's view of a repo by looking in a directory like
|
FWIW, I have seen this problem as well. Setting The problem is here: https://github.com/envoyproxy/protoc-gen-validate/blob/main/validate/BUILD#L33-L38
If I change this name to "validate" I can build properly. |
@jayconrod No worries on the timing, I know you're super busy helping out lots of people. I think there might be another typo in that recommendation. That throws this error, That doesn't eliminate the core issue however. I've tried all the combinations of these suggestions, including updating the library itself from go_repository(
name = "com_github_envoyproxy_protoc_gen_validate",
build_file_generation = "off",
build_file_proto_mode = "disable_global",
build_naming_convention = "go_default_library",
importpath = "github.com/envoyproxy/protoc-gen-validate",
sum = "h1:7dLaJvASGRD7X49jSCSXXHwKPm0ZN9r9kJD+p+vS7dM=",
version = "v0.4.1",
) @mtl-wgtwo How are you making that change? Are you patching it with bazel? Would you mind sharing your config? |
|
I tried manually editing the Not sure if this is a tooling issue, or if there is a PR we might open upstream, or if we just need to settle for patching that file. |
@derekperkins I suspect that we are both going through the same process -- I'm upgrading to the latest Here's the patch I ended up with:
and the
|
Thanks for that. That alias clause seems pretty harmless compared to having to change the actual upstream name. Unless @jayconrod thinks it shouldn't be necessary, we should make a PR to add that to help others avoid this in the future. Another thing that is confusing for me is that I had to add protobuf tooling to my WORKSPACE for this, even though all the generated pb.go files seem to be checked in and build_file_proto_mode is disabled. That's how we consume our internal protos and haven't needed the tooling before. |
@jayconrod curious if you have any suggestions on a direction to try and resolve this @mtl-wgtwo did you get through all the dependency issues? |
Sorry, it looks like this still needs some debugging, but unfortunately I don't have bandwidth to look into it yet. I would have expected your |
I'm still seeing this with gazelle Here are some related issues trying to get stable releases of these upstream dependencies. |
I also ran into this error and can confirms it's fixed by bufbuild/protoc-gen-validate#471. Unfortunately, that requires specifying |
@fmeum Which commit should we specify for |
bufbuild/protoc-gen-validate@4f41f10 should work, but there have been releases since then you could use. |
This works for us now, so I'll go ahead and close this issue |
What version of rules_go are you using?
0.25.1
What version of gazelle are you using?
0.22.3
What version of Bazel are you using?
3.7 & 4.0
Does this issue reproduce with the latest releases of all the above?
Yes
What operating system and processor architecture are you using?
MacOS 11.1 Intel
Go 1.15.6
Any other potentially useful information about your toolchain?
What did you do?
I imported
github.com/envoyproxy/go-control-plane
to build an auth server for envoyWhat did you expect to see?
Go builds just fine, but Bazel does not
What did you see instead?
I hunted through all the references to
protoc-gen-validate
inrules_go
/gazelle
, of which there are quite a few. Adding protobuf as anhttp_archive
link as per bazel-contrib/rules_go#2489 (comment) got me past a first batch of errors. In another issue, you suggested usingtag/commit
instead ofversion/sum
in thego_repository
, but that didn't seem to work.It seems like
protoc-gen-validate
has caused a lot of heartache, so maybe there isn't an easy solution, but I'm not quite sure where to go from here. This is just a transitive dependency, so I'm happy to pin it or not load it as ago_repository
or whatever might make this work.The text was updated successfully, but these errors were encountered: