summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2018-08-12 14:25:10 +0100
committerDaniel Silverstone <dsilvers@digital-scurf.org>2018-08-12 14:25:10 +0100
commitac3cffd32367c6aeca243af07579a303066935df (patch)
tree181fc4823414132ad6d891914ab4c30b43112eb4
parentbeba33b2797f2bcab6b57b4e73e0590435edcab8 (diff)
downloadcache-poker-master.tar.bz2
Use my prost and tower-grpc forks to be nicerHEADmaster
-rw-r--r--Cargo.lock49
-rw-r--r--Cargo.toml12
-rw-r--r--build.rs5
-rw-r--r--src/main.rs33
4 files changed, 40 insertions, 59 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 65c1c84..4c224fd 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -65,9 +65,10 @@ dependencies = [
"futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)",
"http 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "prost 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "prost-derive 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "prost-types 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "prost 0.4.0 (git+http://github.com/kinnison/prost)",
+ "prost-build 0.4.0 (git+http://github.com/kinnison/prost)",
+ "prost-derive 0.4.0 (git+http://github.com/kinnison/prost)",
+ "prost-types 0.4.0 (git+http://github.com/kinnison/prost)",
"tokio-core 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)",
"tower-grpc 0.1.0 (git+https://github.com/kinnison/tower-grpc)",
"tower-grpc-build 0.1.0 (git+https://github.com/kinnison/tower-grpc)",
@@ -154,7 +155,7 @@ name = "failure_derive"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "proc-macro2 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)",
+ "proc-macro2 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)",
"quote 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 0.14.7 (registry+https://github.com/rust-lang/crates.io-index)",
"synstructure 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -366,7 +367,7 @@ dependencies = [
[[package]]
name = "proc-macro2"
-version = "0.4.9"
+version = "0.4.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -375,7 +376,7 @@ dependencies = [
[[package]]
name = "prost"
version = "0.4.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
+source = "git+http://github.com/kinnison/prost#db7deefaeaf20fb6b8f747d9a86d0bd8fb6b7abe"
dependencies = [
"byteorder 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
"bytes 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -384,7 +385,7 @@ dependencies = [
[[package]]
name = "prost-build"
version = "0.4.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
+source = "git+http://github.com/kinnison/prost#db7deefaeaf20fb6b8f747d9a86d0bd8fb6b7abe"
dependencies = [
"bytes 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)",
"env_logger 0.5.12 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -393,8 +394,8 @@ dependencies = [
"log 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
"multimap 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"petgraph 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)",
- "prost 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "prost-types 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "prost 0.4.0 (git+http://github.com/kinnison/prost)",
+ "prost-types 0.4.0 (git+http://github.com/kinnison/prost)",
"tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
"which 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -402,11 +403,11 @@ dependencies = [
[[package]]
name = "prost-derive"
version = "0.4.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
+source = "git+http://github.com/kinnison/prost#db7deefaeaf20fb6b8f747d9a86d0bd8fb6b7abe"
dependencies = [
"failure 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"itertools 0.7.8 (registry+https://github.com/rust-lang/crates.io-index)",
- "proc-macro2 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)",
+ "proc-macro2 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)",
"quote 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 0.14.7 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -414,11 +415,11 @@ dependencies = [
[[package]]
name = "prost-types"
version = "0.4.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
+source = "git+http://github.com/kinnison/prost#db7deefaeaf20fb6b8f747d9a86d0bd8fb6b7abe"
dependencies = [
"bytes 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)",
- "prost 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "prost-derive 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "prost 0.4.0 (git+http://github.com/kinnison/prost)",
+ "prost-derive 0.4.0 (git+http://github.com/kinnison/prost)",
]
[[package]]
@@ -431,7 +432,7 @@ name = "quote"
version = "0.6.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "proc-macro2 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)",
+ "proc-macro2 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -495,7 +496,7 @@ name = "syn"
version = "0.14.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "proc-macro2 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)",
+ "proc-macro2 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)",
"quote 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -505,7 +506,7 @@ name = "synstructure"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "proc-macro2 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)",
+ "proc-macro2 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)",
"quote 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 0.14.7 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -702,7 +703,7 @@ dependencies = [
"h2 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
"http 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "prost 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "prost 0.4.0 (git+http://github.com/kinnison/prost)",
"tower-h2 0.1.0 (git+https://github.com/tower-rs/tower-h2)",
"tower-service 0.1.0 (git+https://github.com/tower-rs/tower)",
]
@@ -714,7 +715,7 @@ source = "git+https://github.com/kinnison/tower-grpc#e02d3e135f098a5c3d6f386adfa
dependencies = [
"codegen 0.1.0 (git+https://github.com/carllerche/codegen)",
"heck 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "prost-build 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "prost-build 0.4.0 (git+http://github.com/kinnison/prost)",
]
[[package]]
@@ -867,11 +868,11 @@ source = "git+http://github.com/hyperium/http?rev=5f362a32278891672f428d570d4638
"checksum nodrop 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "9a2228dca57108069a5262f2ed8bd2e82496d2e074a06d1ccc7ce1687b6ae0a2"
"checksum num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c51a3322e4bca9d212ad9a158a02abc6934d005490c054a2778df73a70aa0a30"
"checksum petgraph 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "8b30dc85588cd02b9b76f5e386535db546d21dc68506cff2abebee0b6445e8e4"
-"checksum proc-macro2 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)" = "cccdc7557a98fe98453030f077df7f3a042052fae465bb61d2c2c41435cfd9b6"
-"checksum prost 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b9f36c478cd43382388dfc3a3679af175c03d19ed8039e79a3e4447e944cd3f3"
-"checksum prost-build 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b6325275b85605f58f576456a47af44417edf5956a6f670bb59fbe12aff69597"
-"checksum prost-derive 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9787d1977ea72e8066d58e46ae66100324a2815e677897fe78dfe54958f48252"
-"checksum prost-types 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5644c57d56bc085f9570e113495c1f08d7185beca700dcc296cb4672f380a679"
+"checksum proc-macro2 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)" = "762eea716b821300a86da08870a64b597304866ceb9f54a11d67b4cf56459c6a"
+"checksum prost 0.4.0 (git+http://github.com/kinnison/prost)" = "<none>"
+"checksum prost-build 0.4.0 (git+http://github.com/kinnison/prost)" = "<none>"
+"checksum prost-derive 0.4.0 (git+http://github.com/kinnison/prost)" = "<none>"
+"checksum prost-types 0.4.0 (git+http://github.com/kinnison/prost)" = "<none>"
"checksum quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9274b940887ce9addde99c4eee6b5c44cc494b182b97e73dc8ffdcb3397fd3f0"
"checksum quote 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "3372dc35766b36a99ce2352bd1b6ea0137c38d215cc0c8780bf6de6df7842ba9"
"checksum rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "eba5f8cb59cc50ed56be8880a5c7b496bfd9bd26394e176bc67884094145c2c5"
diff --git a/Cargo.toml b/Cargo.toml
index e52463e..6b98065 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -11,13 +11,21 @@ log = "0.4"
http = "0.1"
prost = "0.4"
prost-derive = "0.4"
+prost-types = "0.4"
tokio-core = "0.1"
tower-h2 = { git = "https://github.com/tower-rs/tower-h2" }
tower-http = { git = "https://github.com/tower-rs/tower-http" }
-tower-grpc = { git = "https://github.com/kinnison/tower-grpc" }
tower-service = { git = "https://github.com/tower-rs/tower" }
-prost-types = "0.4"
+# Can switch back to tower-rs' version if they resolve my issue
+tower-grpc = { git = "https://github.com/kinnison/tower-grpc" }
[build-dependencies]
+# Can switch back to tower-rs' version if they resolve my issue
tower-grpc-build = { git = "https://github.com/kinnison/tower-grpc" }
+prost-build = "0.4"
[patch.crates-io]
http = { git = "http://github.com/hyperium/http", rev = "5f362a32278891672f428d570d46387fe6896a5d" }
+# Can remove the following as and when my change gets merged (if it does)
+prost = { git = "http://github.com/kinnison/prost" }
+prost-derive = { git = "http://github.com/kinnison/prost" }
+prost-types = { git = "http://github.com/kinnison/prost" }
+prost-build = { git = "http://github.com/kinnison/prost" }
diff --git a/build.rs b/build.rs
index 64fca57..1401ff9 100644
--- a/build.rs
+++ b/build.rs
@@ -1,7 +1,10 @@
extern crate tower_grpc_build;
+extern crate prost_build;
fn main() {
- tower_grpc_build::Config::new()
+ let mut conf = prost_build::Config::new();
+ conf.include_file("_protos.rs");
+ tower_grpc_build::Config::from_prost(conf)
.enable_server(true)
.enable_client(true)
.build(
diff --git a/src/main.rs b/src/main.rs
index dff2d91..d48d706 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -19,38 +19,7 @@ use tokio_core::reactor::Core;
use tower_grpc::Request;
use tower_h2::client::Connection;
-pub mod google {
- pub mod bytestream {
- include!(concat!(env!("OUT_DIR"), "/google.bytestream.rs"));
- }
- pub mod longrunning {
- include!(concat!(env!("OUT_DIR"), "/google.longrunning.rs"));
- }
- pub mod rpc {
- include!(concat!(env!("OUT_DIR"), "/google.rpc.rs"));
- }
- pub mod protobuf {
- include!(concat!(env!("OUT_DIR"), "/google.protobuf.rs"));
- }
-}
-
-pub mod build {
- pub mod bazel {
- pub mod remote {
- pub mod execution {
- pub mod v2 {
- include!(concat!(
- env!("OUT_DIR"),
- "/build.bazel.remote.execution.v2.rs"
- ));
- }
- }
- }
- pub mod semver {
- include!(concat!(env!("OUT_DIR"), "/build.bazel.semver.rs"));
- }
- }
-}
+include!(concat!(env!("OUT_DIR"), "/_protos.rs"));
pub fn main() {
let _ = ::env_logger::init();