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

Building grpc-gateway from new_git_repository #65

Closed
pcj opened this issue Aug 14, 2016 · 1 comment
Closed

Building grpc-gateway from new_git_repository #65

pcj opened this issue Aug 14, 2016 · 1 comment

Comments

@pcj
Copy link
Member

pcj commented Aug 14, 2016

I'm attempting to build the runtime and other targets from https://github.com/grpc-ecosystem/grpc-gateway with rules_go and a BUILD file for new_git_repository build-file. I'm blocked with:

github.com/grpc-ecosystem/grpc-gateway/external/com_github_grpc_ecosystem_grpc_gateway/runtime/internal/stream_chunk.pb.go:14: package internal; expected runtime

that I believe to be related due to the issues discussed in bazelbuild/bazel#828 and #16.

new_git_repository(
  name = "com_github_grpc_ecosystem_grpc_gateway",
  remote = "https://github.com/grpc-ecosystem/grpc-gateway.git",
  commit = "ccd4e6b091a44f9f6b32848ffc63b3e8f8e26092",
  build_file = "//third_party/com_github_grpc_ecosystem_grpc_gateway:BUILD",
)
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library", "go_prefix")

go_prefix("github.com/grpc-ecosystem/grpc-gateway")

go_library(
    name = 'runtime',
    srcs = [
        "runtime/context.go",
        "runtime/convert.go",
        "runtime/doc.go",
        "runtime/errors.go",
        "runtime/handler.go",
        "runtime/marshal_json.go",
        "runtime/marshal_jsonpb.go",
        "runtime/marshaler.go",
        "runtime/marshaler_registry.go",
        "runtime/mux.go",
        "runtime/pattern.go",
        "runtime/proto2_convert.go",
        "runtime/query.go",
        "runtime/internal/stream_chunk.pb.go",
    ],
    deps = [
        "runtime/internal",
        "utilities",
        "@com_github_golang_protobuf//:jsonpb",
        "@com_github_golang_protobuf//:proto",
        "@org_golang_google_grpc//:codes",
        "@org_golang_google_grpc//:go_default_library",
        "@org_golang_google_grpc//:grpclog",
        "@org_golang_google_grpc//:metadata",
        "@org_golang_x_net//:context",
    ],
)

go_library(
    name    = 'runtime/internal',
    srcs = [
        "runtime/internal/stream_chunk.pb.go",
    ],
    deps = [
        "@com_github_golang_protobuf//:proto",
    ],
)

go_library(
    name = 'utilities',
    srcs = [
        "utilities/doc.go",
        "utilities/pattern.go",
        "utilities/trie.go",
    ],
)

Any workaround for this?


As #16 was closed by #57, I experimented with gazelle to see if this could somehow solve the issue, but didn't get farther than running the tool with:

bazel build '@io_bazel_rules_go//go/tools/gazelle/gazelle'
bazel-bin/external/io_bazel_rules_go/go/tools/gazelle/gazelle/gazelle \
-repo_root /private/var/tmp/_bazel_pcj/63330772b4917b139280caef8bb81867/external/com_github_grpc_ecosystem_grpc_gateway

I'm not seeing (or not recognizing) any output from above or any other go-related folder.

@pcj
Copy link
Member Author

pcj commented Aug 15, 2016

Duplicate file entry in :runtime, closing this.

@pcj pcj closed this as completed Aug 15, 2016
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

1 participant