We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
From the example provided, a developer will typically construct a BUILD file as follows:
load("@rules_proto_grpc_python//:defs.bzl", "python_grpc_library") python_grpc_library( name = "thing_python_grpc", protos = ["@rules_proto_grpc_example_protos//:thing_proto"], )
However, sometimes, a developer wants to use a specific version of protobuf or grpcio that their project is using. Their BUILD file should look like:
protobuf
grpcio
load("@my_projects_pip_deps//:requirements.bzl", "requirement") load("@rules_proto_grpc_python//:defs.bzl", "python_grpc_library") python_grpc_library( name = "thing_python_grpc", protos = ["@rules_proto_grpc_example_protos//:thing_proto"], deps = [ requirement("grpcio"), requirement("protobuf"), ], )
This however does not work because in the current code, protobuf and grpcio python packages are hardcoded to use the versions in rules_proto_grpc_python/requirements.txt
rules_proto_grpc_python/requirements.txt
While this one example occurs in the python_grpc_library, similar behavior occurs in python_proto_libraryand python_grpclib_library.
python_grpc_library
python_proto_library
python_grpclib_library
A simple solution might be to just check user provided deps for protobuf or grpcio and to assign a default if none were provided.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Description
From the example provided, a developer will typically construct a BUILD file as follows:
However, sometimes, a developer wants to use a specific version of
protobuf
orgrpcio
that their project is using. Their BUILD file should look like:This however does not work because in the current code,
protobuf
andgrpcio
python packages are hardcoded to use the versions inrules_proto_grpc_python/requirements.txt
While this one example occurs in the
python_grpc_library
, similar behavior occurs inpython_proto_library
andpython_grpclib_library
.A simple solution might be to just check user provided deps for
protobuf
orgrpcio
and to assign a default if none were provided.The text was updated successfully, but these errors were encountered: