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

Switch to serde's derive feature, update Rust to 2021 #585

Merged
merged 1 commit into from
Sep 18, 2024
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
5 changes: 5 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ members = [
"timely",
]

resolver = "2"

[workspace.package]
edition = "2021"

[profile.release]
opt-level = 3
debug = true
Expand Down
5 changes: 2 additions & 3 deletions communication/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "timely_communication"
version = "0.12.0"
authors = ["Frank McSherry <[email protected]>"]
description = "Communication layer for timely dataflow"
edition = "2018"
edition.workspace = true

# These URLs point to more information about the repository

Expand All @@ -20,8 +20,7 @@ default = ["getopts"]
getopts = { version = "0.2.14", optional = true }
bincode = { version = "1.0" }
byteorder = "1.5"
serde_derive = "1.0"
serde = "1.0"
serde = { version = "1.0", features = ["derive"] }
timely_bytes = { path = "../bytes", version = "0.12" }
timely_logging = { path = "../logging", version = "0.12" }
crossbeam-channel = "0.5.0"
4 changes: 2 additions & 2 deletions container/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[package]
name = "timely_container"
version = "0.12.0"
edition = "2018"
description = "Container abstractions for Timely"
license = "MIT"
edition.workspace = true

[dependencies]
columnation = { git = "https://github.com/frankmcsherry/columnation" }
flatcontainer = "0.5"
serde = { version = "1.0"}
serde = { version = "1.0", features = ["derive"] }
3 changes: 1 addition & 2 deletions logging/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
name = "timely_logging"
version = "0.12.0"
authors = ["Frank McSherry <[email protected]>"]
edition = "2018"

description = "Common timely logging infrastructure"
edition.workspace = true

documentation = "https://docs.rs/timely/"
homepage = "https://github.com/TimelyDataflow/timely-dataflow"
Expand Down
6 changes: 2 additions & 4 deletions timely/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ name = "timely"
version = "0.12.0"
authors = ["Frank McSherry <[email protected]>"]
readme = "../README.md"
edition = "2018"

edition.workspace = true
description = "A low-latency data-parallel dataflow system in Rust"

# These URLs point to more information about the repository
Expand All @@ -22,8 +21,7 @@ getopts = ["getopts-dep", "timely_communication/getopts"]
[dependencies]
getopts-dep = { package = "getopts", version = "0.2.14", optional = true }
bincode = { version = "1.0" }
serde = "1.0"
serde_derive = "1.0"
serde = { version = "1.0", features = ["derive"] }
timely_bytes = { path = "../bytes", version = "0.12" }
timely_logging = { path = "../logging", version = "0.12" }
timely_communication = { path = "../communication", version = "0.12", default-features = false }
Expand Down
1 change: 1 addition & 0 deletions timely/src/dataflow/channels/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//! Structured communication between timely dataflow operators.

use serde::{Deserialize, Serialize};
use crate::communication::Push;
use crate::Container;

Expand Down
2 changes: 2 additions & 0 deletions timely/src/dataflow/operators/core/capture/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
//! stream. There are two types of events, (i) the receipt of data and (ii) reports of progress
//! of timestamps.

use serde::{Deserialize, Serialize};

/// Data and progress events of the captured stream.
#[derive(Debug, Clone, Hash, Ord, PartialOrd, Eq, PartialEq, Deserialize, Serialize)]
pub enum Event<T, C> {
Expand Down
2 changes: 0 additions & 2 deletions timely/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@

extern crate bincode;
extern crate serde;
#[macro_use]
extern crate serde_derive;
extern crate timely_communication;
extern crate timely_bytes;
extern crate timely_logging;
Expand Down
3 changes: 2 additions & 1 deletion timely/src/logging.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ pub type TimelyLogger = Logger<TimelyEvent>;
pub type TimelyProgressLogger = Logger<TimelyProgressEvent>;

use std::time::Duration;
use serde::{Deserialize, Serialize};
use crate::dataflow::operators::capture::{Event, EventPusher};

/// Logs events as a timely stream, with progress statements.
Expand Down Expand Up @@ -81,7 +82,7 @@ pub trait ProgressEventTimestamp: std::fmt::Debug + std::any::Any {
/// # Example
/// ```rust
/// let ts = vec![(0usize, 0usize, (23u64, 10u64), -4i64), (0usize, 0usize, (23u64, 11u64), 1i64)];
/// let ts: &timely::logging::ProgressEventTimestampVec = &ts;
/// let ts: &dyn timely::logging::ProgressEventTimestampVec = &ts;
/// for (n, p, t, d) in ts.iter() {
/// print!("{:?}, ", (n, p, t.as_any().downcast_ref::<(u64, u64)>(), d));
/// }
Expand Down
1 change: 1 addition & 0 deletions timely/src/order.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ pub use product::flatcontainer::ProductRegion as FlatProductRegion;
/// A pair of timestamps, partially ordered by the product order.
mod product {
use std::fmt::{Formatter, Error, Debug};
use serde::{Deserialize, Serialize};

use crate::container::columnation::{Columnation, Region};
use crate::order::{Empty, TotalOrder};
Expand Down
1 change: 1 addition & 0 deletions timely/src/progress/change_batch.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//! A collection of updates of the form `(T, i64)`.

use serde::{Deserialize, Serialize};
use smallvec::SmallVec;

/// A collection of updates of the form `(T, i64)`.
Expand Down
1 change: 1 addition & 0 deletions timely/src/progress/frontier.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//! Tracks minimal sets of mutually incomparable elements of a partial order.

use serde::{Deserialize, Serialize};
use smallvec::SmallVec;

use crate::progress::ChangeBatch;
Expand Down
1 change: 1 addition & 0 deletions timely/src/progress/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//! Progress tracking mechanisms to support notification in timely dataflow

use serde::{Deserialize, Serialize};
pub use self::operate::Operate;
pub use self::subgraph::{Subgraph, SubgraphBuilder};
pub use self::timestamp::{Timestamp, PathSummary};
Expand Down
Loading