diff --git a/rust-toolchain b/rust-toolchain index a50908ca3da..3987c472943 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -1.42.0 +1.43.1 diff --git a/src/rust/engine/Cargo.lock b/src/rust/engine/Cargo.lock index 1dfc83a60e3..45ac195dbf9 100644 --- a/src/rust/engine/Cargo.lock +++ b/src/rust/engine/Cargo.lock @@ -115,7 +115,7 @@ dependencies = [ "copy_dir 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "dir-diff 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "grpcio 0.5.1 (git+https://github.com/pantsbuild/grpc-rs.git?rev=d16fcfb4afbdd4c791e7c7e64e9748319ed8ad70)", + "grpcio 0.5.1 (git+https://github.com/pantsbuild/grpc-rs.git?rev=ed3afa3c24ddf1fdd86826e836f57c00757dfc00)", "grpcio-compiler 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "hashing 0.0.1", "prost 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -724,17 +724,7 @@ dependencies = [ [[package]] name = "derivative" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "derivative" -version = "2.0.2" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 1.0.12 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1279,10 +1269,10 @@ dependencies = [ [[package]] name = "grpcio" version = "0.5.1" -source = "git+https://github.com/pantsbuild/grpc-rs.git?rev=d16fcfb4afbdd4c791e7c7e64e9748319ed8ad70#d16fcfb4afbdd4c791e7c7e64e9748319ed8ad70" +source = "git+https://github.com/pantsbuild/grpc-rs.git?rev=ed3afa3c24ddf1fdd86826e836f57c00757dfc00#ed3afa3c24ddf1fdd86826e836f57c00757dfc00" dependencies = [ "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "grpcio-sys 0.5.1 (git+https://github.com/pantsbuild/grpc-rs.git?rev=d16fcfb4afbdd4c791e7c7e64e9748319ed8ad70)", + "grpcio-sys 0.5.1 (git+https://github.com/pantsbuild/grpc-rs.git?rev=ed3afa3c24ddf1fdd86826e836f57c00757dfc00)", "libc 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "protobuf 2.0.6 (git+https://github.com/pantsbuild/rust-protobuf?rev=171611c33ec92f07e1b7107327f6d0139a7afebf)", @@ -1300,7 +1290,7 @@ dependencies = [ [[package]] name = "grpcio-sys" version = "0.5.1" -source = "git+https://github.com/pantsbuild/grpc-rs.git?rev=d16fcfb4afbdd4c791e7c7e64e9748319ed8ad70#d16fcfb4afbdd4c791e7c7e64e9748319ed8ad70" +source = "git+https://github.com/pantsbuild/grpc-rs.git?rev=ed3afa3c24ddf1fdd86826e836f57c00757dfc00#ed3afa3c24ddf1fdd86826e836f57c00757dfc00" dependencies = [ "bindgen 0.53.2 (registry+https://github.com/rust-lang/crates.io-index)", "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1901,7 +1891,7 @@ dependencies = [ "bazel_protos 0.0.1", "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "grpcio 0.5.1 (git+https://github.com/pantsbuild/grpc-rs.git?rev=d16fcfb4afbdd4c791e7c7e64e9748319ed8ad70)", + "grpcio 0.5.1 (git+https://github.com/pantsbuild/grpc-rs.git?rev=ed3afa3c24ddf1fdd86826e836f57c00757dfc00)", "hashing 0.0.1", "parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "protobuf 2.0.6 (git+https://github.com/pantsbuild/rust-protobuf?rev=171611c33ec92f07e1b7107327f6d0139a7afebf)", @@ -2063,7 +2053,7 @@ name = "num_enum" version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "derivative 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "derivative 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "num_enum_derive 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2328,12 +2318,12 @@ dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "concrete_time 0.0.1", "copy_dir 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "derivative 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "derivative 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", "fs 0.0.1", "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "grpcio 0.5.1 (git+https://github.com/pantsbuild/grpc-rs.git?rev=d16fcfb4afbdd4c791e7c7e64e9748319ed8ad70)", + "grpcio 0.5.1 (git+https://github.com/pantsbuild/grpc-rs.git?rev=ed3afa3c24ddf1fdd86826e836f57c00757dfc00)", "hashing 0.0.1", "itertools 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3116,7 +3106,7 @@ dependencies = [ "fs 0.0.1", "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "grpcio 0.5.1 (git+https://github.com/pantsbuild/grpc-rs.git?rev=d16fcfb4afbdd4c791e7c7e64e9748319ed8ad70)", + "grpcio 0.5.1 (git+https://github.com/pantsbuild/grpc-rs.git?rev=ed3afa3c24ddf1fdd86826e836f57c00757dfc00)", "hashing 0.0.1", "indexmap 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "itertools 0.7.11 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3966,8 +3956,7 @@ dependencies = [ "checksum ct-logs 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4d3686f5fa27dbc1d76c751300376e167c5a43387f44bb451fd1c24776e49113" "checksum curl 0.4.28 (registry+https://github.com/rust-lang/crates.io-index)" = "eda1c0c03cacf3365d84818a40293f0e3f3953db8759c9c565a3b434edf0b52e" "checksum curl-sys 0.4.30+curl-7.69.1 (registry+https://github.com/rust-lang/crates.io-index)" = "923b38e423a8f47a4058e96f2a1fa2865a6231097ee860debd678d244277d50c" -"checksum derivative 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "3c6d883546668a3e2011b6a716a7330b82eabb0151b138217f632c8243e17135" -"checksum derivative 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1b94d2eb97732ec84b4e25eaf37db890e317b80e921f168c82cb5282473f8151" +"checksum derivative 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cb582b60359da160a9477ee80f15c8d784c477e69c217ef2cdd4169c24ea380f" "checksum digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" "checksum dir-diff 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2860407d7d7e2e004bb2128510ad9e8d669e76fa005ccf567977b5d71b8b4a0b" "checksum dirs 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "3fd78930633bd1c6e35c4b42b1df7b0cbc6bc191146e512bb3bedf243fcc3901" @@ -4016,9 +4005,9 @@ dependencies = [ "checksum glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb" "checksum glob 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" "checksum globset 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "7ad1da430bd7281dde2576f44c84cc3f0f7b475e7202cd503042dff01a8c8120" -"checksum grpcio 0.5.1 (git+https://github.com/pantsbuild/grpc-rs.git?rev=d16fcfb4afbdd4c791e7c7e64e9748319ed8ad70)" = "" +"checksum grpcio 0.5.1 (git+https://github.com/pantsbuild/grpc-rs.git?rev=ed3afa3c24ddf1fdd86826e836f57c00757dfc00)" = "" "checksum grpcio-compiler 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a63ccc27b0099347d2bea2c3d0f1c79c018a13cfd08b814a1992e341b645d5e1" -"checksum grpcio-sys 0.5.1 (git+https://github.com/pantsbuild/grpc-rs.git?rev=d16fcfb4afbdd4c791e7c7e64e9748319ed8ad70)" = "" +"checksum grpcio-sys 0.5.1 (git+https://github.com/pantsbuild/grpc-rs.git?rev=ed3afa3c24ddf1fdd86826e836f57c00757dfc00)" = "" "checksum h2 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)" = "a5b34c246847f938a410a03c5458c7fee2274436675e76d8b903c08efc29c462" "checksum h2 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9d5c295d1c0c68e4e42003d75f908f5e16a1edd1cbe0b0d02e4dc2006a384f47" "checksum heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" diff --git a/src/rust/engine/engine_cffi/build.rs b/src/rust/engine/engine_cffi/build.rs index 06cfec8d18b..274b59c4db5 100644 --- a/src/rust/engine/engine_cffi/build.rs +++ b/src/rust/engine/engine_cffi/build.rs @@ -25,9 +25,6 @@ // Arc can be more clear than needing to grok Orderings: #![allow(clippy::mutex_atomic)] -use cbindgen; -use cc; - /* We use the `gcc` crate to compile the CFFI C sources (`native_engine.c`) generated by `bootstrap.sh` into a (private) static lib (`libnative_engine_ffi.a`), diff --git a/src/rust/engine/engine_cffi/src/lib.rs b/src/rust/engine/engine_cffi/src/lib.rs index 727a524e347..431fc5fbad4 100644 --- a/src/rust/engine/engine_cffi/src/lib.rs +++ b/src/rust/engine/engine_cffi/src/lib.rs @@ -65,7 +65,6 @@ use std::panic; use std::path::{Path, PathBuf}; use std::time::Duration; use tempfile::TempDir; -use tokio; use workunit_store::{Workunit, WorkunitState}; #[cfg(test)] diff --git a/src/rust/engine/fs/brfs/src/main.rs b/src/rust/engine/fs/brfs/src/main.rs index 99fe7668a78..f94e37c11cc 100644 --- a/src/rust/engine/fs/brfs/src/main.rs +++ b/src/rust/engine/fs/brfs/src/main.rs @@ -25,19 +25,6 @@ // Arc can be more clear than needing to grok Orderings: #![allow(clippy::mutex_atomic)] -use bazel_protos; -use clap; -use dirs; - -use env_logger; -use fuse; - -use libc; - -use serverset; - -use time; - use futures::future::FutureExt; use hashing::{Digest, Fingerprint}; use log::{debug, error, warn}; diff --git a/src/rust/engine/fs/fs_util/src/main.rs b/src/rust/engine/fs/fs_util/src/main.rs index 7a480007128..b2116a65f44 100644 --- a/src/rust/engine/fs/fs_util/src/main.rs +++ b/src/rust/engine/fs/fs_util/src/main.rs @@ -25,14 +25,6 @@ // Arc can be more clear than needing to grok Orderings: #![allow(clippy::mutex_atomic)] -use clap; -use env_logger; -use fs; - -use rand; - -use serde_json; - use boxfuture::{BoxFuture, Boxable}; use bytes::Bytes; use clap::{value_t, App, Arg, SubCommand}; diff --git a/src/rust/engine/fs/store/Cargo.toml b/src/rust/engine/fs/store/Cargo.toml index 45dd4f13b3b..875edd7eff5 100644 --- a/src/rust/engine/fs/store/Cargo.toml +++ b/src/rust/engine/fs/store/Cargo.toml @@ -14,8 +14,8 @@ dirs = "1" fs = { path = ".." } futures01 = { package = "futures", version = "0.1" } futures = { version = "0.3", features = ["compat"] } -# TODO: This is 0.5.1 + https://github.com/tikv/grpc-rs/pull/457. -grpcio = { git = "https://github.com/pantsbuild/grpc-rs.git", rev = "d16fcfb4afbdd4c791e7c7e64e9748319ed8ad70", default_features = false, features = ["protobuf-codec", "secure"] } +# TODO: This is 0.5.1 + https://github.com/tikv/grpc-rs/pull/457 + a workaround for https://github.com/rust-lang/cargo/issues/8258 +grpcio = { git = "https://github.com/pantsbuild/grpc-rs.git", rev = "ed3afa3c24ddf1fdd86826e836f57c00757dfc00", default_features = false, features = ["protobuf-codec", "secure"] } hashing = { path = "../../hashing" } indexmap = "1.0.2" itertools = "0.7.2" diff --git a/src/rust/engine/fs/store/src/lib.rs b/src/rust/engine/fs/store/src/lib.rs index 0534a498197..0dd98626a95 100644 --- a/src/rust/engine/fs/store/src/lib.rs +++ b/src/rust/engine/fs/store/src/lib.rs @@ -34,11 +34,9 @@ pub use crate::snapshot::{OneOffStoreFileByDigest, Snapshot, StoreFileByDigest}; #[cfg(test)] mod snapshot_tests; -use bazel_protos; use boxfuture::{try_future, BoxFuture, Boxable}; use bytes::Bytes; use concrete_time::TimeSpan; -use dirs; use fs::FileContent; use futures::compat::Future01CompatExt; use futures::future::{FutureExt, TryFutureExt}; diff --git a/src/rust/engine/fs/store/src/local.rs b/src/rust/engine/fs/store/src/local.rs index b5e8c234a19..7a7b2edafae 100644 --- a/src/rust/engine/fs/store/src/local.rs +++ b/src/rust/engine/fs/store/src/local.rs @@ -7,7 +7,6 @@ use lmdb::Error::NotFound; use lmdb::{self, Cursor, Database, RwTransaction, Transaction, WriteFlags}; use sha2::Sha256; use sharded_lmdb::{ShardedLmdb, VersionedFingerprint}; -use std; use std::collections::BinaryHeap; use std::path::Path; use std::sync::Arc; diff --git a/src/rust/engine/fs/store/src/remote.rs b/src/rust/engine/fs/store/src/remote.rs index 6e499bd6113..212cc05bcb9 100644 --- a/src/rust/engine/fs/store/src/remote.rs +++ b/src/rust/engine/fs/store/src/remote.rs @@ -7,7 +7,6 @@ use digest::{Digest as DigestTrait, FixedOutput}; use futures::compat::Future01CompatExt; use futures::future::{FutureExt, TryFutureExt}; use futures01::{future, Future, Sink, Stream}; -use grpcio; use hashing::{Digest, Fingerprint}; use serverset::{retry, Serverset}; use sha2::Sha256; @@ -15,7 +14,6 @@ use std::cmp::min; use std::collections::{BTreeMap, HashSet}; use std::sync::Arc; use std::time::Duration; -use uuid; #[derive(Clone)] pub struct ByteStore { diff --git a/src/rust/engine/fs/store/src/snapshot.rs b/src/rust/engine/fs/store/src/snapshot.rs index e0546229d95..1fc04fa63d4 100644 --- a/src/rust/engine/fs/store/src/snapshot.rs +++ b/src/rust/engine/fs/store/src/snapshot.rs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0 (see LICENSE). use crate::Store; -use bazel_protos; use boxfuture::{BoxFuture, Boxable}; use bytes::Bytes; use fs::{ @@ -15,8 +14,6 @@ use futures01::future; use hashing::{Digest, EMPTY_DIGEST}; use indexmap::{self, IndexMap}; use itertools::Itertools; -use log; -use protobuf; use std::collections::{HashMap, HashSet}; use std::ffi::OsString; use std::fmt; diff --git a/src/rust/engine/graph/src/lib.rs b/src/rust/engine/graph/src/lib.rs index 53af9373f51..938c826cc69 100644 --- a/src/rust/engine/graph/src/lib.rs +++ b/src/rust/engine/graph/src/lib.rs @@ -25,10 +25,6 @@ // Arc can be more clear than needing to grok Orderings: #![allow(clippy::mutex_atomic)] -use hashing; - -use petgraph; - // make the entry module public for testing purposes. We use it to construct mock // graph entries in the notify watch tests. pub mod entry; diff --git a/src/rust/engine/hashing/src/lib.rs b/src/rust/engine/hashing/src/lib.rs index dcebe3dadb2..293a6c7c205 100644 --- a/src/rust/engine/hashing/src/lib.rs +++ b/src/rust/engine/hashing/src/lib.rs @@ -25,8 +25,6 @@ // Arc can be more clear than needing to grok Orderings: #![allow(clippy::mutex_atomic)] -use hex; - use digest::{Digest as DigestTrait, FixedOutput}; use serde::ser::{Serialize, SerializeStruct, Serializer}; use serde::{Deserialize, Deserializer}; diff --git a/src/rust/engine/logging/src/logger.rs b/src/rust/engine/logging/src/logger.rs index 5546b540006..3b98b3b9364 100644 --- a/src/rust/engine/logging/src/logger.rs +++ b/src/rust/engine/logging/src/logger.rs @@ -13,7 +13,6 @@ use std::io::{stderr, Stderr, Write}; use std::path::PathBuf; use std::sync::atomic::{AtomicBool, Ordering}; -use chrono; use lazy_static::lazy_static; use log::{debug, log, set_logger, set_max_level, LevelFilter, Log, Metadata, Record}; use parking_lot::Mutex; diff --git a/src/rust/engine/nailgun/src/lib.rs b/src/rust/engine/nailgun/src/lib.rs index 6daadd84c79..6d86e57e8a2 100644 --- a/src/rust/engine/nailgun/src/lib.rs +++ b/src/rust/engine/nailgun/src/lib.rs @@ -44,7 +44,6 @@ use log::{debug, error, info}; pub use nails::execution::ExitCode; use nails::execution::{self, send_to_io, sink_for, stream_for, ChildInput, ChildOutput}; use nails::Nail; -use os_pipe; use tokio::fs::File; use tokio::net::TcpListener; use tokio::sync::watch; diff --git a/src/rust/engine/process_execution/Cargo.toml b/src/rust/engine/process_execution/Cargo.toml index 19c3adc4f03..4f25ac0491c 100644 --- a/src/rust/engine/process_execution/Cargo.toml +++ b/src/rust/engine/process_execution/Cargo.toml @@ -13,13 +13,13 @@ async_semaphore = { path = "../async_semaphore" } bazel_protos = { path = "bazel_protos" } boxfuture = { path = "../boxfuture" } bytes = "0.4.5" -derivative = "1.0.2" +derivative = "2.1.1" digest = "0.8" fs = { path = "../fs" } futures01 = { package = "futures", version = "0.1" } futures = { version = "0.3", features = ["compat"] } -# TODO: This is 0.5.1 + https://github.com/tikv/grpc-rs/pull/457. -grpcio = { git = "https://github.com/pantsbuild/grpc-rs.git", rev = "d16fcfb4afbdd4c791e7c7e64e9748319ed8ad70", default_features = false, features = ["protobuf-codec", "secure"] } +# TODO: This is 0.5.1 + https://github.com/tikv/grpc-rs/pull/457 + a workaround for https://github.com/rust-lang/cargo/issues/8258 +grpcio = { git = "https://github.com/pantsbuild/grpc-rs.git", rev = "ed3afa3c24ddf1fdd86826e836f57c00757dfc00", default_features = false, features = ["protobuf-codec", "secure"] } hashing = { path = "../hashing" } libc = "0.2.39" log = "0.4" diff --git a/src/rust/engine/process_execution/bazel_protos/Cargo.toml b/src/rust/engine/process_execution/bazel_protos/Cargo.toml index d5c076921f7..abdf0458b71 100644 --- a/src/rust/engine/process_execution/bazel_protos/Cargo.toml +++ b/src/rust/engine/process_execution/bazel_protos/Cargo.toml @@ -8,8 +8,8 @@ publish = false [dependencies] bytes = "0.4.5" futures = "^0.1.16" -# TODO: This is 0.5.1 + https://github.com/tikv/grpc-rs/pull/457. -grpcio = { git = "https://github.com/pantsbuild/grpc-rs.git", rev = "d16fcfb4afbdd4c791e7c7e64e9748319ed8ad70", default_features = false, features = ["protobuf-codec", "secure"] } +# TODO: This is 0.5.1 + https://github.com/tikv/grpc-rs/pull/457 + a workaround for https://github.com/rust-lang/cargo/issues/8258 +grpcio = { git = "https://github.com/pantsbuild/grpc-rs.git", rev = "ed3afa3c24ddf1fdd86826e836f57c00757dfc00", default_features = false, features = ["protobuf-codec", "secure"] } hashing = { path = "../../hashing" } prost = "0.4" prost-derive = "0.4" diff --git a/src/rust/engine/process_execution/bazel_protos/build.rs b/src/rust/engine/process_execution/bazel_protos/build.rs index a274eb47e3d..9072a032522 100644 --- a/src/rust/engine/process_execution/bazel_protos/build.rs +++ b/src/rust/engine/process_execution/bazel_protos/build.rs @@ -1,8 +1,6 @@ // Copyright 2018 Pants project contributors (see CONTRIBUTORS.md). // Licensed under the Apache License, Version 2.0 (see LICENSE). -use protoc_grpcio; - use std::path::{Path, PathBuf}; use build_utils::BuildRoot; diff --git a/src/rust/engine/process_execution/bazel_protos/src/conversions.rs b/src/rust/engine/process_execution/bazel_protos/src/conversions.rs index 677363dd9e3..f556e2b64f7 100644 --- a/src/rust/engine/process_execution/bazel_protos/src/conversions.rs +++ b/src/rust/engine/process_execution/bazel_protos/src/conversions.rs @@ -1,5 +1,3 @@ -use hashing; - impl<'a> From<&'a hashing::Digest> for crate::remote_execution::Digest { fn from(d: &hashing::Digest) -> Self { let mut digest = super::remote_execution::Digest::new(); diff --git a/src/rust/engine/process_execution/bazel_protos/src/verification.rs b/src/rust/engine/process_execution/bazel_protos/src/verification.rs index 22f4ad35fd2..6adcec82ba4 100644 --- a/src/rust/engine/process_execution/bazel_protos/src/verification.rs +++ b/src/rust/engine/process_execution/bazel_protos/src/verification.rs @@ -1,5 +1,4 @@ use crate::remote_execution; -use protobuf; use std::collections::HashSet; diff --git a/src/rust/engine/process_execution/src/cache.rs b/src/rust/engine/process_execution/src/cache.rs index 1c5b6e3a959..bbc60f26745 100644 --- a/src/rust/engine/process_execution/src/cache.rs +++ b/src/rust/engine/process_execution/src/cache.rs @@ -5,7 +5,6 @@ use crate::{ use std::sync::Arc; use async_trait::async_trait; -use bincode; use bytes::Bytes; use futures::compat::Future01CompatExt; use futures::future; diff --git a/src/rust/engine/process_execution/src/local.rs b/src/rust/engine/process_execution/src/local.rs index 28bc5d8e6bb..65c055a7935 100644 --- a/src/rust/engine/process_execution/src/local.rs +++ b/src/rust/engine/process_execution/src/local.rs @@ -1,6 +1,3 @@ -use log; -use tempfile; - use async_trait::async_trait; use boxfuture::{try_future, BoxFuture, Boxable}; use fs::{self, GlobExpansionConjunction, GlobMatching, PathGlobs, StrictGlobMatching}; diff --git a/src/rust/engine/process_execution/src/remote.rs b/src/rust/engine/process_execution/src/remote.rs index 27318a2debe..9c3b4966e6c 100644 --- a/src/rust/engine/process_execution/src/remote.rs +++ b/src/rust/engine/process_execution/src/remote.rs @@ -15,9 +15,7 @@ use fs::{self, File, PathStat}; use futures::compat::Future01CompatExt; use futures::future::{self as future03, TryFutureExt}; use futures01::{future, Future, Stream}; -use grpcio; use hashing::{Digest, Fingerprint}; -use libc; use log::{debug, trace, warn}; use protobuf::{self, Message, ProtobufEnum}; use sha2::Sha256; @@ -28,7 +26,6 @@ use crate::{ Context, ExecutionStats, FallibleProcessResultWithPlatform, MultiPlatformProcess, Platform, PlatformConstraint, Process, ProcessMetadata, }; -use std; use std::cmp::min; use workunit_store::WorkunitStore; diff --git a/src/rust/engine/process_executor/src/main.rs b/src/rust/engine/process_executor/src/main.rs index 9fa4986c4b2..20034e37390 100644 --- a/src/rust/engine/process_executor/src/main.rs +++ b/src/rust/engine/process_executor/src/main.rs @@ -25,11 +25,6 @@ // Arc can be more clear than needing to grok Orderings: #![allow(clippy::mutex_atomic)] -use clap; -use env_logger; - -use process_execution; - use clap::{value_t, App, AppSettings, Arg}; use futures::compat::Future01CompatExt; use hashing::{Digest, Fingerprint}; diff --git a/src/rust/engine/src/context.rs b/src/rust/engine/src/context.rs index 89c68839f1d..a8b46b581b4 100644 --- a/src/rust/engine/src/context.rs +++ b/src/rust/engine/src/context.rs @@ -27,7 +27,6 @@ use process_execution::{ ProcessMetadata, }; use rand::seq::SliceRandom; -use reqwest; use rule_graph::RuleGraph; use sharded_lmdb::ShardedLmdb; use store::Store; diff --git a/src/rust/engine/src/core.rs b/src/rust/engine/src/core.rs index f441734ec76..60a4260e56c 100644 --- a/src/rust/engine/src/core.rs +++ b/src/rust/engine/src/core.rs @@ -10,7 +10,6 @@ use std::{fmt, hash}; use crate::externs; use crate::handles::Handle; -use rule_graph; use smallvec::{smallvec, SmallVec}; pub type FNV = hash::BuildHasherDefault; diff --git a/src/rust/engine/src/intrinsics.rs b/src/rust/engine/src/intrinsics.rs index e19ee678d40..7ebd57b16f3 100644 --- a/src/rust/engine/src/intrinsics.rs +++ b/src/rust/engine/src/intrinsics.rs @@ -7,10 +7,8 @@ use crate::tasks::Intrinsic; use crate::types::Types; use boxfuture::Boxable; -use bytes; use futures::future::{self as future03, TryFutureExt}; use futures01::{future, Future}; -use hashing; use indexmap::IndexMap; use std::path::PathBuf; diff --git a/src/rust/engine/src/nodes.rs b/src/rust/engine/src/nodes.rs index a6da92609e8..ffd4a8713de 100644 --- a/src/rust/engine/src/nodes.rs +++ b/src/rust/engine/src/nodes.rs @@ -28,11 +28,9 @@ use fs::{ self, Dir, DirectoryListing, File, FileContent, GlobExpansionConjunction, GlobMatching, Link, PathGlobs, PathStat, PreparedPathGlobs, StrictGlobMatching, VFS, }; -use hashing; use process_execution::{ self, MultiPlatformProcess, NamedCache, PlatformConstraint, Process, RelativePath, }; -use rule_graph; use graph::{Entry, Node, NodeError, NodeVisualizer}; use store::{self, StoreFileByDigest}; diff --git a/src/rust/engine/src/scheduler.rs b/src/rust/engine/src/scheduler.rs index c1546b4a979..082be2095f0 100644 --- a/src/rust/engine/src/scheduler.rs +++ b/src/rust/engine/src/scheduler.rs @@ -16,7 +16,6 @@ use crate::core::{Failure, Params, TypeId, Value}; use crate::nodes::{NodeKey, Select, Visualizer}; use graph::{InvalidationResult, LastObserved}; -use hashing; use log::{debug, info, warn}; use parking_lot::Mutex; use task_executor::Executor; diff --git a/src/rust/engine/src/selectors.rs b/src/rust/engine/src/selectors.rs index a0fd71e0b74..692fe9e0dba 100644 --- a/src/rust/engine/src/selectors.rs +++ b/src/rust/engine/src/selectors.rs @@ -5,8 +5,6 @@ use std::fmt; use crate::core::TypeId; -use rule_graph; - #[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)] pub struct Get { pub product: TypeId, diff --git a/src/rust/engine/src/tasks.rs b/src/rust/engine/src/tasks.rs index 6ddc05479f2..78961ee0a5a 100644 --- a/src/rust/engine/src/tasks.rs +++ b/src/rust/engine/src/tasks.rs @@ -8,8 +8,6 @@ use crate::core::{Function, TypeId}; use crate::intrinsics::Intrinsics; use crate::selectors::{DependencyKey, Get, Select}; -use rule_graph; - #[derive(Eq, Hash, PartialEq, Clone, Debug)] pub enum Rule { // Intrinsic rules are implemented in rust. diff --git a/src/rust/engine/testutil/local_cas/src/main.rs b/src/rust/engine/testutil/local_cas/src/main.rs index 27313412a47..0e13e1098b7 100644 --- a/src/rust/engine/testutil/local_cas/src/main.rs +++ b/src/rust/engine/testutil/local_cas/src/main.rs @@ -25,8 +25,6 @@ // Arc can be more clear than needing to grok Orderings: #![allow(clippy::mutex_atomic)] -use env_logger; - use clap::{App, Arg}; use mock::StubCAS; use std::io; diff --git a/src/rust/engine/testutil/mock/Cargo.toml b/src/rust/engine/testutil/mock/Cargo.toml index 2771be17e42..b888b9752ac 100644 --- a/src/rust/engine/testutil/mock/Cargo.toml +++ b/src/rust/engine/testutil/mock/Cargo.toml @@ -9,8 +9,8 @@ publish = false bazel_protos = { path = "../../process_execution/bazel_protos" } bytes = "0.4.5" futures01 = { package = "futures", version = "0.1" } -# TODO: This is 0.5.1 + https://github.com/tikv/grpc-rs/pull/457. -grpcio = { git = "https://github.com/pantsbuild/grpc-rs.git", rev = "d16fcfb4afbdd4c791e7c7e64e9748319ed8ad70", default_features = false, features = ["protobuf-codec", "secure"] } +# TODO: This is 0.5.1 + https://github.com/tikv/grpc-rs/pull/457 + a workaround for https://github.com/rust-lang/cargo/issues/8258 +grpcio = { git = "https://github.com/pantsbuild/grpc-rs.git", rev = "ed3afa3c24ddf1fdd86826e836f57c00757dfc00", default_features = false, features = ["protobuf-codec", "secure"] } hashing = { path = "../../hashing" } parking_lot = "0.6" protobuf = { version = "2.0.6", features = ["with-bytes"] } diff --git a/src/rust/engine/testutil/mock/src/cas.rs b/src/rust/engine/testutil/mock/src/cas.rs index 09c090e8fa3..a16542be43f 100644 --- a/src/rust/engine/testutil/mock/src/cas.rs +++ b/src/rust/engine/testutil/mock/src/cas.rs @@ -1,9 +1,6 @@ use std::collections::HashMap; use std::sync::Arc; -use bazel_protos; -use grpcio; - use bytes::Bytes; use futures01::{Future, IntoFuture, Stream}; use hashing::{Digest, Fingerprint}; diff --git a/src/rust/engine/testutil/mock/src/execution_server.rs b/src/rust/engine/testutil/mock/src/execution_server.rs index 5352d5b9ec3..f59a459063a 100644 --- a/src/rust/engine/testutil/mock/src/execution_server.rs +++ b/src/rust/engine/testutil/mock/src/execution_server.rs @@ -7,11 +7,8 @@ use std::thread::sleep; use std::time::Duration; use std::time::Instant; -use bazel_protos; use futures01::{Future, Sink}; -use grpcio; use parking_lot::Mutex; -use protobuf; /// /// A MockOperation to be used with MockExecution. diff --git a/src/rust/engine/testutil/src/data.rs b/src/rust/engine/testutil/src/data.rs index 39a3ddd10b6..dfb5be6c977 100644 --- a/src/rust/engine/testutil/src/data.rs +++ b/src/rust/engine/testutil/src/data.rs @@ -1,7 +1,4 @@ -use bazel_protos; -use bytes; use digest::FixedOutput; -use hashing; use protobuf::Message; use sha2::{self, Digest}; diff --git a/src/rust/engine/testutil/src/file.rs b/src/rust/engine/testutil/src/file.rs index 2604c8daebb..91ee686867a 100644 --- a/src/rust/engine/testutil/src/file.rs +++ b/src/rust/engine/testutil/src/file.rs @@ -1,5 +1,3 @@ -use bytes; -use std; use std::io::Read; use std::os::unix::fs::PermissionsExt; use std::path::Path; diff --git a/src/rust/engine/watch/src/lib.rs b/src/rust/engine/watch/src/lib.rs index e4ae9b4141a..d43d1ef5180 100644 --- a/src/rust/engine/watch/src/lib.rs +++ b/src/rust/engine/watch/src/lib.rs @@ -37,7 +37,6 @@ use std::time::Duration; use crossbeam_channel::{self, Receiver, RecvTimeoutError, TryRecvError}; use fs::GitignoreStyleExcludes; use log::{debug, trace, warn}; -use logging; use notify::{RecommendedWatcher, RecursiveMode, Watcher}; use parking_lot::Mutex; use task_executor::Executor;