witty-crayon-22786
01/06/2018, 6:07 AMdiff --git a/build-support/bin/native/bootstrap.sh b/build-support/bin/native/bootstrap.sh
index aabe01a..f732d46 100644
--- a/build-support/bin/native/bootstrap.sh
+++ b/build-support/bin/native/bootstrap.sh
@@ -93,8 +93,11 @@ function ensure_native_build_prerequisites() {
if [[ ! -x "${CARGO_HOME}/bin/protoc-gen-rust" ]]; then
"${CARGO_HOME}/bin/cargo" install protobuf >&2
fi
- if [[ ! -x "${CARGO_HOME}/bin/grpc_rust_plugin" ]]; then
- "${CARGO_HOME}/bin/cargo" install grpcio-compiler >&2
+ if [[ ! -x "${CARGO_HOME}/bin/grpc_rust_plugin" ]] || ! grep '^"grpcio-compiler .*2acabdbff71e77a14b95b0b30c6d7de516355df7' "${CARGO_HOME}/.crates.toml" >/dev/null 2>/dev/null; then
+ # Force install of a version we know is compatible with the version of grpc we use.
+ # There hasn't been a release since the changes we depend on (<https://github.com/pingcap/grpc-rs/pull/101>)
+ # so we need to manually mess with versions here.
+ "${CARGO_HOME}/bin/cargo" install --force --git=<https://github.com/illicitonion/grpc-rs> --rev=2acabdbff71e77a14b95b0b30c6d7de516355df7 grpcio-compiler >&2
fi
if [[ ! -x "${CARGO_HOME}/bin/rustfmt" ]]; then
"${CARGO_HOME}/bin/cargo" install rustfmt >&2