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

Bazel can't find rules_proto//java package when running java_grpc_library #7

Open
haikalpribadi opened this issue Oct 4, 2018 · 0 comments

Comments

@haikalpribadi
Copy link

haikalpribadi commented Oct 4, 2018

Hi @pcj,

I'm trying to use java_grpc_library and hitting my head against the wall. :/

In //dependencies/compilers/dependencies.bzl I have:

def grpc_dependencies():
    ...
    native.git_repository(
        name = "org_pubref_rules_proto",
        remote = "https://github.com/pubref/rules_proto",
        commit = "27da2e7af9e4a1c43c584be2f05be8a301a642b6",
    )

In WORKSPACE I loaded:

load("//dependencies/compilers:dependencies.bzl", "grpc_dependencies")
grpc_dependencies()

load("@org_pubref_rules_proto//java:deps.bzl", "java_grpc_compile")
java_grpc_compile()

Then in the //protocol/BUILD I do:

load("@org_pubref_rules_proto//java:library.bzl", "java_grpc_library")
java_grpc_library(
    name = "client-java-proto",
    deps = [
        "//protocol/session:session-proto",
        "//protocol/keyspace:keyspace-proto",
    ],
    visibility = [
        "//server:__subpackages__",
        "//client-java:__subpackages__",
    ]
)

Then when i run bazel build //protocol:client-java-proto i get this error:

ERROR: /Users/haikalpribadi/Workspace/repos/graknlabs/grakn/protocol/BUILD:20:1: no such package 'java': BUILD file not found on package path and referenced by '//protocol:client-java-proto'

Do you know what I'm missing here? Bazel can't seem to find the java package in rules_proto which is clearly sitting there at the root!

I've pushed it up to my repo, it's on bazel-init-java-grpc-library-fails. https://github.com/haikalpribadi/grakn/tree/bazel-init-java-grp-library-fails

Can you help figure out what's going on?

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