Skip to content

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

Description

@haikalpribadi

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions