How to use a specific version of protoc ?

21 views
Skip to first unread message

jao...@gmail.com

unread,
Jul 6, 2020, 3:22:38 AM7/6/20
to grpc.io

Hi all,



I'd like to use a specific version of protoc (3.9.1) when building a library that depends on grpc


In the WORKSPACE I have the following lines to load grpc dependencies:


  load("@com_github_grpc_grpc//bazel:grpc_deps.bzl", "grpc_deps")

  grpc_deps()

  load("@com_github_grpc_grpc//bazel:grpc_extra_deps.bzl", "grpc_extra_deps")

  grpc_extra_deps()


If I use recent grpc source (1.27+), it uses a version of protobuf that I can't set automatically.


Is it possible to use a specific version of protoc in this case ?

Richard Belleville

unread,
Jul 6, 2020, 2:45:17 PM7/6/20
to grpc.io

You should be able to specify your preferred version of the protobuf repo in your WORKSPACE file. As you can see, we only provide a default revision of the protobuf repo when none is specified by the workspace pulling us in. However, we only test against this version in CI, so it's possible that you'll have to manually work through build issues when you supply your desired version.
Reply all
Reply to author
Forward
0 new messages