Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade Rust to 1.43.1 #9681

Merged
merged 9 commits into from
May 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.42.0
1.43.1
37 changes: 13 additions & 24 deletions src/rust/engine/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions src/rust/engine/engine_cffi/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@
// Arc<Mutex> 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`),
Expand Down
1 change: 0 additions & 1 deletion src/rust/engine/engine_cffi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
13 changes: 0 additions & 13 deletions src/rust/engine/fs/brfs/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,6 @@
// Arc<Mutex> 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};
Expand Down
8 changes: 0 additions & 8 deletions src/rust/engine/fs/fs_util/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,6 @@
// Arc<Mutex> 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};
Expand Down
4 changes: 2 additions & 2 deletions src/rust/engine/fs/store/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 0 additions & 2 deletions src/rust/engine/fs/store/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down
1 change: 0 additions & 1 deletion src/rust/engine/fs/store/src/local.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 0 additions & 2 deletions src/rust/engine/fs/store/src/remote.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,13 @@ 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;
use std::cmp::min;
use std::collections::{BTreeMap, HashSet};
use std::sync::Arc;
use std::time::Duration;
use uuid;

#[derive(Clone)]
pub struct ByteStore {
Expand Down
3 changes: 0 additions & 3 deletions src/rust/engine/fs/store/src/snapshot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::{
Expand All @@ -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;
Expand Down
4 changes: 0 additions & 4 deletions src/rust/engine/graph/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@
// Arc<Mutex> 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;
Expand Down
2 changes: 0 additions & 2 deletions src/rust/engine/hashing/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
// Arc<Mutex> 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};
Expand Down
1 change: 0 additions & 1 deletion src/rust/engine/logging/src/logger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion src/rust/engine/nailgun/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions src/rust/engine/process_execution/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions src/rust/engine/process_execution/bazel_protos/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 0 additions & 2 deletions src/rust/engine/process_execution/bazel_protos/build.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use crate::remote_execution;
use protobuf;

use std::collections::HashSet;

Expand Down
1 change: 0 additions & 1 deletion src/rust/engine/process_execution/src/cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 0 additions & 3 deletions src/rust/engine/process_execution/src/local.rs
Original file line number Diff line number Diff line change
@@ -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};
Expand Down
3 changes: 0 additions & 3 deletions src/rust/engine/process_execution/src/remote.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -28,7 +26,6 @@ use crate::{
Context, ExecutionStats, FallibleProcessResultWithPlatform, MultiPlatformProcess, Platform,
PlatformConstraint, Process, ProcessMetadata,
};
use std;
use std::cmp::min;
use workunit_store::WorkunitStore;

Expand Down
5 changes: 0 additions & 5 deletions src/rust/engine/process_executor/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@
// Arc<Mutex> 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};
Expand Down
1 change: 0 additions & 1 deletion src/rust/engine/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion src/rust/engine/src/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<FnvHasher>;
Expand Down
2 changes: 0 additions & 2 deletions src/rust/engine/src/intrinsics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Loading