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

gazelle generates wrong rules for vendored dependency with protobuf #943

Closed
excavador opened this issue Oct 19, 2017 · 4 comments
Closed
Labels

Comments

@excavador
Copy link

bazel

➜ bazel version
Build label: 0.7.0-homebrew
Build target: bazel-out/darwin_x86_64-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Thu Oct 19 09:12:48 2017 (1508404368)
Build timestamp: 1508404368
Build timestamp as int: 1508404368

WORKSPACE

git_repository(
    name = "io_bazel_rules_go",
    remote = "https://github.com/bazelbuild/rules_go.git",
    commit = "ad076c97335c03319280fa438c9f958e7c81597a",
)
load("@io_bazel_rules_go//go:def.bzl", "go_rules_dependencies", "go_register_toolchains")
go_rules_dependencies()
go_register_toolchains(go_version="1.9.1")

load("@io_bazel_rules_go//proto:def.bzl", "proto_register_toolchains")
proto_register_toolchains()

vendored dependency
github.com/openzipkin/zipkin-go-opentracing

➜ bazel build -s //vendor/github.com/openzipkin/zipkin-go-opentracing/wire:go_default_library --verbose_failures
INFO: Found 1 target...
>>>>> # //vendor/github.com/openzipkin/zipkin-go-opentracing/wire:wire_go_proto [action 'Generating into bazel-out/darwin_x86_64-fastbuild/bin/vendor/github.com/openzipkin/zipkin-go-opentracing/wire/wire_go_proto/github.com/openzipkin/zipkin-go-opentracing/wire']
(cd /private/var/tmp/_bazel_oleg/30dc65884a035215491df0f4f99fe54f/execroot/__main__ && \
  exec env - \
  bazel-out/host/bin/external/com_github_google_protobuf/protoc '--go_out=:bazel-out/darwin_x86_64-fastbuild/bin/vendor/github.com/openzipkin/zipkin-go-opentracing/wire/wire_go_proto/' '--plugin=protoc-gen-go=bazel-out/host/bin/external/com_github_golang_protobuf/protoc-gen-go/protoc-gen-go' --descriptor_set_in bazel-out/darwin_x86_64-fastbuild/genfiles/vendor/github.com/openzipkin/zipkin-go-opentracing/wire/wire_proto-descriptor-set.proto.bin vendor/github.com/openzipkin/zipkin-go-opentracing/wire/wire.proto)
ERROR: /Users/oleg/pp/backend/vendor/github.com/openzipkin/zipkin-go-opentracing/wire/BUILD.bazel:10:1: output 'vendor/github.com/openzipkin/zipkin-go-opentracing/wire/wire_go_proto/github.com/openzipkin/zipkin-go-opentracing/wire/wire.pb.go' was not created.
ERROR: /Users/oleg/pp/backend/vendor/github.com/openzipkin/zipkin-go-opentracing/wire/BUILD.bazel:10:1: not all outputs were created or valid.
Target //vendor/github.com/openzipkin/zipkin-go-opentracing/wire:go_default_library failed to build
INFO: Elapsed time: 0.173s, Critical Path: 0.06s
@excavador
Copy link
Author

I have the repo with the problem
https://github.com/excavador/bazel_vendor_bug

@tomwilkie
Copy link

@excavador this is #836, I've made a PR for openzipkin/zipkin-go-opentracing which should fix this: openzipkin-contrib/zipkin-go-opentracing#83

@excavador
Copy link
Author

Thank you!

@jayconrod
Copy link
Contributor

Closing old Gazelle issues. If something still isn't working, please file a new issue at bazelbuild/bazel-gazelle.

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

No branches or pull requests

4 participants