Skip to content

Commit

Permalink
cleanup some futures-related references (pantsbuild#11360)
Browse files Browse the repository at this point in the history
- Cleanup futures-related references in various `Cargo.toml` files and source files now that v0.3.x is the only version.

- Remove ASYNC.md documentation that only dealt with futures v0.1.x / v0.3.x interoperability.
  • Loading branch information
Tom Dyas authored Dec 22, 2020
1 parent 1e77ef5 commit 4147293
Show file tree
Hide file tree
Showing 14 changed files with 35 additions and 57 deletions.
15 changes: 0 additions & 15 deletions src/rust/engine/ASYNC.md

This file was deleted.

47 changes: 20 additions & 27 deletions src/rust/engine/Cargo.lock

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

2 changes: 1 addition & 1 deletion src/rust/engine/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ cpython = "0.5"
crossbeam-channel = "0.4"
fnv = "1.0.5"
fs = { path = "fs" }
futures = { version = "0.3" }
futures = "0.3"
graph = { path = "graph" }
hashing = { path = "hashing" }
indexmap = "1.4"
Expand Down
2 changes: 1 addition & 1 deletion src/rust/engine/fs/fs_util/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ clap = "2"
env_logger = "0.5.4"
grpc_util = { path = "../../grpc_util" }
fs = { path = ".." }
futures = { version = "0.3" }
futures = "0.3"
hashing = { path = "../../hashing" }
parking_lot = "0.11"
prost = { git = "https://github.com/danburkert/prost", rev = "a1cccbcee343e2c444e1cd2738c7fba2599fc391" }
Expand Down
2 changes: 1 addition & 1 deletion src/rust/engine/fs/store/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ bytes = "0.5"
concrete_time = { path = "../../concrete_time" }
grpc_util = { path = "../../grpc_util" }
fs = { path = ".." }
futures = { version = "0.3" }
futures = "0.3"
glob = "0.2.11"
hashing = { path = "../../hashing" }
indexmap = "1.4"
Expand Down
2 changes: 1 addition & 1 deletion src/rust/engine/grpc_util/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ publish = false

[dependencies]
bytes = "0.5"
futures = { version = "0.3" }
futures = "0.3"
prost = "0.6"
prost-types = "0.6"
tokio = { version = "0.2.23", features = ["process", "rt-threaded", "sync", "tcp", "time"] }
Expand Down
2 changes: 1 addition & 1 deletion src/rust/engine/nailgun/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ publish = false
[dependencies]
async_latch = { path = "../async_latch" }
bytes = "0.5"
futures = "0.3.5"
futures = "0.3"
log = "0.4"
nails = "0.8"
os_pipe = "0.9"
Expand Down
2 changes: 1 addition & 1 deletion src/rust/engine/process_execution/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ bytes = "0.5"
derivative = "2.1.1"
grpc_util = { path = "../grpc_util" }
fs = { path = "../fs" }
futures = { version = "0.3", features = ["compat"] }
futures = "0.3"
hashing = { path = "../hashing" }
libc = "0.2.39"
log = "0.4"
Expand Down
4 changes: 2 additions & 2 deletions src/rust/engine/process_execution/src/cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::sync::Arc;
use async_trait::async_trait;
use bazel_protos::gen::build::bazel::remote::execution::v2 as remexec;
use bytes::Bytes;
use futures::{future as future03, FutureExt};
use futures::{future, FutureExt};
use hashing::Fingerprint;
use log::{debug, warn};
use prost::Message;
Expand Down Expand Up @@ -157,7 +157,7 @@ impl CommandRunner {
};

// Ensure that all digests in the result are loadable, erroring if any are not.
let _ = future03::try_join_all(vec![
let _ = future::try_join_all(vec![
self
.file_store
.ensure_local_has_file(result.stdout_digest)
Expand Down
2 changes: 1 addition & 1 deletion src/rust/engine/process_executor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ clap = "2"
dirs = "1"
env_logger = "0.5.4"
fs = { path = "../fs" }
futures = { version = "0.3", features = ["compat"] }
futures = "0.3"
hashing = { path = "../hashing" }
log = "0.4"
process_execution = { path = "../process_execution" }
Expand Down
6 changes: 3 additions & 3 deletions src/rust/engine/src/externs/interface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ use cpython::{
ToPyObject,
};
use futures::future::FutureExt;
use futures::future::{self as future03, TryFutureExt};
use futures::future::{self, TryFutureExt};
use futures::Future;
use hashing::Digest;
use log::{self, debug, error, warn, Log};
Expand Down Expand Up @@ -1586,7 +1586,7 @@ fn capture_snapshots(
.collect::<Vec<_>>();
py.allow_threads(|| {
core.executor.block_on(
future03::try_join_all(snapshot_futures)
future::try_join_all(snapshot_futures)
.map_ok(|values| externs::store_tuple(values).into()),
)
})
Expand Down Expand Up @@ -1659,7 +1659,7 @@ fn single_file_digests_to_bytes(
let bytes_values: Vec<PyObject> = py
.allow_threads(|| {
core.executor.block_on(
future03::try_join_all(digest_futures)
future::try_join_all(digest_futures)
.map_ok(|values: Vec<Value>| values.into_iter().map(|val| val.into()).collect()),
)
})
Expand Down
2 changes: 1 addition & 1 deletion src/rust/engine/testutil/mock/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ publish = false
async-stream = "0.2"
bazel_protos = { path = "../../process_execution/bazel_protos" }
bytes = "0.5"
futures = { version = "0.3" }
futures = "0.3"
hashing = { path = "../../hashing" }
hyper = { version = "0.13", features = ["stream", "tcp"] }
log = "0.4"
Expand Down
2 changes: 1 addition & 1 deletion src/rust/engine/tryfuture/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ authors = [ "Pants Build <[email protected]>" ]
publish = false

[dependencies]
futures = { version = "0.3" }
futures = "0.3"

2 changes: 1 addition & 1 deletion src/rust/engine/ui/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ authors = [ "Pants Build <[email protected]>" ]
path = "src/console_ui.rs"

[dependencies]
futures = { version = "0.3" }
futures = "0.3"
indicatif = "0.14.0"
indexmap = "1.4"
uuid = { version = "0.7", features = ["v4"] }
Expand Down

0 comments on commit 4147293

Please sign in to comment.