From 2b85a48c71f975656c9069d98e1065bcd7016afd Mon Sep 17 00:00:00 2001
From: Max Inden <mail@max-inden.de>
Date: Mon, 30 Sep 2019 16:51:28 +0200
Subject: [PATCH] core/sr-api-macros/Cargo.toml: Pin protobuf version (#3723)

* Cargo.toml: Pin protobuf version

The protobuf crate introduced a breaking change within its semver minor
update from 2.8.1 to 2.9.0. This commit ensures Substrate uses anything
within the 2.8 minor releases.

* Cargo.lock: Update

* core/sr-api-macros/Cargo.toml: Pin protobuf version

The protobuf crate introduced a breaking change within its semver minor
update from 2.8.1 to 2.9.0. This commit ensures Substrate uses anything
within the 2.8 minor releases.

* Revert "Cargo.toml: Pin protobuf version"

This reverts commit 4e293c741c5c4510cb1a347c444d1876d65ddb1e.

* core/sr-api-macros/Cargo.toml: Pin protobuf within dev-dependencies

* core/sr-api-macros/Cargo.toml: Add comment and link to Githu issue
---
 substrate/Cargo.lock                    | 1 +
 substrate/core/sr-api-macros/Cargo.toml | 5 +++++
 2 files changed, 6 insertions(+)

diff --git a/substrate/Cargo.lock b/substrate/Cargo.lock
index 0787d7faec4..f3a76716ae4 100644
--- a/substrate/Cargo.lock
+++ b/substrate/Cargo.lock
@@ -3830,6 +3830,7 @@ dependencies = [
  "parity-scale-codec 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "proc-macro-crate 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)",
+ "protobuf 2.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)",
  "rustversion 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "sr-primitives 2.0.0",
diff --git a/substrate/core/sr-api-macros/Cargo.toml b/substrate/core/sr-api-macros/Cargo.toml
index c025ad800e3..1bfa920a0ce 100644
--- a/substrate/core/sr-api-macros/Cargo.toml
+++ b/substrate/core/sr-api-macros/Cargo.toml
@@ -26,6 +26,11 @@ consensus_common = { package = "substrate-consensus-common", path = "../consensu
 codec = { package = "parity-scale-codec", version = "1.0.0" }
 trybuild = "1.0"
 rustversion = "0.1"
+# The protobuf crate introduced a breaking change within its semver minor update
+# from 2.8.1 to 2.9.0. The dependency bound below ensures sr-api-macros uses
+# anything within the 2.8 minor releases. Remove once
+# https://github.com/stepancheg/rust-protobuf/issues/453 is resolved.
+protobuf = "~2.8.0"
 
 [[bench]]
 name = "bench"
-- 
GitLab