Skip to content

Commit

Permalink
Bring differential to Rust 2021
Browse files Browse the repository at this point in the history
What started as a simple change to visibility .. went sideways.

Signed-off-by: Moritz Hoffmann <[email protected]>
  • Loading branch information
antiguru committed Dec 7, 2023
1 parent 008680f commit b4c40f6
Show file tree
Hide file tree
Showing 123 changed files with 348 additions and 753 deletions.
26 changes: 21 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,29 +13,45 @@ repository = "https://github.com/TimelyDataflow/differential-dataflow.git"
keywords = ["differential", "dataflow"]
license = "MIT"
readme = "README.md"
edition="2021"

[workspace]
members = [".", "dogsdogsdogs"]
members = [
".",
# "advent_of_code_2017",
"dogsdogsdogs",
"experiments",
"interactive",
"server",
"server/dataflows/degr_dist",
"server/dataflows/neighborhood",
"server/dataflows/random_graph",
"server/dataflows/reachability",
#"tpchlike",
"doop"
]

[dev-dependencies]
bincode = "1.3.1"
rdkafka = "0.24"
indexmap = "1.0.1"
indexmap = "2.1"
rand="0.4"
byteorder="1"
itertools="^0.7"
serde_json = "1.0"
graph_map = "0.1"

[dependencies]
serde = "1.0"
serde_derive = "1.0"
serde = { version = "1.0", features = ["derive"] }
abomonation = "0.7"
abomonation_derive = "0.5"
fnv="1.0.2"
timely = {workspace = true}

[workspace.dependencies]
#timely = { version = "0.12", default-features = false }
timely = { git = "https://github.com/TimelyDataflow/timely-dataflow", default-features = false }
#timely = { path = "../timely-dataflow/timely/", default-features = false }
fnv="1.0.2"

[features]
default = ["timely/getopts"]
Expand Down
4 changes: 0 additions & 4 deletions benches/sort-bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
// #![feature(test)]
// #![feature(collections)]
//
// extern crate differential_dataflow;
// extern crate rand;
// extern crate test;
//
// use rand::{Rng, SeedableRng, StdRng, Rand};
// use test::Bencher;
//
Expand Down
3 changes: 2 additions & 1 deletion dogsdogsdogs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ name = "dogsdogsdogs"
version = "0.1.0"
authors = ["Frank McSherry <[email protected]>"]
license = "MIT"
edition = "2021"

[dependencies]
abomonation = "0.7"
abomonation_derive = "0.5"
timely = { git = "https://github.com/TimelyDataflow/timely-dataflow", default-features = false }
timely = { workspace = true }
differential-dataflow = { path = "../", default-features = false }
serde = "1"
serde_derive = "1"
Expand Down
6 changes: 0 additions & 6 deletions dogsdogsdogs/examples/delta_query.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
extern crate timely;
extern crate graph_map;
extern crate differential_dataflow;

extern crate dogsdogsdogs;

use timely::dataflow::Scope;
use timely::dataflow::operators::probe::Handle;
use differential_dataflow::input::Input;
Expand Down
6 changes: 0 additions & 6 deletions dogsdogsdogs/examples/delta_query2.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
extern crate timely;
extern crate graph_map;
extern crate differential_dataflow;

extern crate dogsdogsdogs;

use timely::dataflow::Scope;
use timely::order::Product;
use timely::dataflow::operators::probe::Handle;
Expand Down
6 changes: 0 additions & 6 deletions dogsdogsdogs/examples/delta_query_wcoj.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
extern crate timely;
extern crate graph_map;
extern crate differential_dataflow;

extern crate dogsdogsdogs;

use timely::dataflow::Scope;
use timely::dataflow::operators::probe::Handle;
use differential_dataflow::input::Input;
Expand Down
6 changes: 0 additions & 6 deletions dogsdogsdogs/examples/dogsdogsdogs.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
extern crate timely;
extern crate graph_map;
extern crate differential_dataflow;

extern crate dogsdogsdogs;

use timely::dataflow::operators::{ToStream, Partition, Accumulate, Inspect, Probe};
use timely::dataflow::operators::probe::Handle;
use differential_dataflow::{Collection, AsCollection};
Expand Down
4 changes: 0 additions & 4 deletions dogsdogsdogs/examples/ngo.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
extern crate timely;
extern crate graph_map;
extern crate differential_dataflow;

use std::hash::Hash;
use timely::dataflow::*;
use timely::dataflow::operators::*;
Expand Down
3 changes: 2 additions & 1 deletion dogsdogsdogs/src/altneu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
//! element of the second lattice, if neither first element equals
//! the join.


use abomonation_derive::Abomonation;
use serde_derive::{Deserialize, Serialize};

/// A pair of timestamps, partially ordered by the product order.
#[derive(Debug, Hash, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Abomonation, Serialize, Deserialize)]
Expand Down
9 changes: 0 additions & 9 deletions dogsdogsdogs/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
#[macro_use]
extern crate abomonation_derive;
extern crate abomonation;
extern crate timely;
extern crate differential_dataflow;
#[macro_use]
extern crate serde_derive;
extern crate serde;

use std::hash::Hash;

use timely::dataflow::Scope;
Expand Down
5 changes: 3 additions & 2 deletions doop/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
name = "doop"
version = "0.1.0"
authors = ["Frank McSherry <[email protected]>"]
edition = "2021"

[dependencies]
indexmap = "1.0.1"
timely = { git = "https://github.com/TimelyDataflow/timely-dataflow" }
indexmap = "2.1"
timely = {workspace = true}
differential-dataflow = { path = "../" }
7 changes: 1 addition & 6 deletions doop/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
#![allow(non_snake_case)]

extern crate indexmap;
extern crate timely;
extern crate differential_dataflow;


use std::collections::HashMap;
use std::rc::Rc;
use std::cell::RefCell;
Expand All @@ -17,7 +12,7 @@ use differential_dataflow::ExchangeData as Data;
use differential_dataflow::lattice::Lattice;
use differential_dataflow::input::Input;
use differential_dataflow::operators::iterate::Variable;
use differential_dataflow::operators::{Threshold, Join, JoinCore, Consolidate};
use differential_dataflow::operators::{Threshold, Join, JoinCore};
use differential_dataflow::operators::arrange::ArrangeByKey;

// Type aliases for differential execution.
Expand Down
4 changes: 0 additions & 4 deletions examples/accumulate.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
extern crate rand;
extern crate timely;
extern crate differential_dataflow;

use rand::{Rng, SeedableRng, StdRng};

use differential_dataflow::input::Input;
Expand Down
4 changes: 0 additions & 4 deletions examples/arrange.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
extern crate rand;
extern crate timely;
extern crate differential_dataflow;

use rand::{Rng, SeedableRng, StdRng};

use timely::dataflow::operators::*;
Expand Down
4 changes: 0 additions & 4 deletions examples/bfs.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
extern crate rand;
extern crate timely;
extern crate differential_dataflow;

use rand::{Rng, SeedableRng, StdRng};

use timely::dataflow::*;
Expand Down
7 changes: 0 additions & 7 deletions examples/capture-test.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
extern crate rand;
extern crate timely;
extern crate differential_dataflow;

extern crate serde;
extern crate rdkafka;

use rand::{Rng, SeedableRng, StdRng};

use timely::dataflow::*;
Expand Down
3 changes: 0 additions & 3 deletions examples/compact.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
extern crate timely;
extern crate differential_dataflow;

use differential_dataflow::input::Input;
use differential_dataflow::operators::Threshold;

Expand Down
3 changes: 0 additions & 3 deletions examples/cursors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@
//! Final graph: {(2, 1): 1, (3, 2): 1, (3, 4): 1, (4, 3): 1}
//! ```

extern crate differential_dataflow;
extern crate timely;

use std::fmt::Debug;
use std::collections::BTreeMap;

Expand Down
4 changes: 0 additions & 4 deletions examples/degrees.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
extern crate rand;
extern crate timely;
extern crate differential_dataflow;

use rand::{Rng, SeedableRng, StdRng};

use differential_dataflow::input::Input;
Expand Down
4 changes: 0 additions & 4 deletions examples/dynamic.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
extern crate rand;
extern crate timely;
extern crate differential_dataflow;

use rand::{Rng, SeedableRng, StdRng};

use timely::dataflow::*;
Expand Down
3 changes: 0 additions & 3 deletions examples/freeze.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
extern crate timely;
extern crate differential_dataflow;

use timely::dataflow::operators::probe::Handle;
use timely::dataflow::operators::Map;

Expand Down
4 changes: 0 additions & 4 deletions examples/graspan.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
extern crate indexmap;
extern crate timely;
extern crate differential_dataflow;

use std::io::{BufRead, BufReader};
use std::fs::File;

Expand Down
4 changes: 0 additions & 4 deletions examples/hello.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
extern crate rand;
extern crate timely;
extern crate differential_dataflow;

use rand::{Rng, SeedableRng, StdRng};

use differential_dataflow::input::Input;
Expand Down
4 changes: 0 additions & 4 deletions examples/interpreted.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
extern crate timely;
extern crate graph_map;
extern crate differential_dataflow;

use std::hash::Hash;
use timely::dataflow::*;
use timely::dataflow::operators::*;
Expand Down
4 changes: 0 additions & 4 deletions examples/itembased_cf.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
extern crate timely;
extern crate differential_dataflow;
extern crate rand;

use differential_dataflow::input::InputSession;
use differential_dataflow::operators::{Join,CountTotal,Count};
use differential_dataflow::operators::arrange::ArrangeByKey;
Expand Down
14 changes: 2 additions & 12 deletions examples/monoid-bfs.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
extern crate rand;
extern crate timely;
extern crate differential_dataflow;

#[macro_use]
extern crate abomonation_derive;
extern crate abomonation;
#[macro_use]
extern crate serde_derive;
extern crate serde;


use abomonation_derive::Abomonation;
use rand::{Rng, SeedableRng, StdRng};
use serde::{Deserialize, Serialize};

use timely::dataflow::*;
use timely::dataflow::operators::probe::Handle;
Expand Down
16 changes: 6 additions & 10 deletions examples/multitemporal.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
#[macro_use]
extern crate abomonation_derive;
extern crate abomonation;

extern crate rand;
extern crate timely;
extern crate differential_dataflow;

use std::io::BufRead;

use timely::dataflow::ProbeHandle;
Expand Down Expand Up @@ -144,7 +136,7 @@ fn main() {
mod pair {

/// A pair of timestamps, partially ordered by the product order.
#[derive(Hash, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Abomonation)]
#[derive(Hash, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Abomonation, Serialize, Deserialize)]
pub struct Pair<S, T> {
pub first: S,
pub second: T,
Expand Down Expand Up @@ -211,6 +203,8 @@ mod pair {
}

use std::fmt::{Formatter, Error, Debug};
use abomonation_derive::Abomonation;
use serde::{Deserialize, Serialize};

/// Debug implementation to avoid seeing fully qualified path names.
impl<TOuter: Debug, TInner: Debug> Debug for Pair<TOuter, TInner> {
Expand All @@ -227,9 +221,11 @@ mod pair {
/// from the rest of the library other than the traits it needs to implement. With this
/// type and its implementations, you can use it as a timestamp type.
mod vector {
use abomonation_derive::Abomonation;
use serde::{Deserialize, Serialize};

/// A pair of timestamps, partially ordered by the product order.
#[derive(Hash, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Abomonation, Debug)]
#[derive(Hash, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Abomonation, Debug, Serialize, Deserialize)]
pub struct Vector<T> {
pub vector: Vec<T>,
}
Expand Down
4 changes: 0 additions & 4 deletions examples/pagerank.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
extern crate timely;
extern crate graph_map;
extern crate differential_dataflow;

use timely::order::Product;
use timely::dataflow::{*, operators::Filter};

Expand Down
3 changes: 0 additions & 3 deletions examples/progress.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
//! A demonstration of timely dataflow progress tracking, using differential dataflow operators.

extern crate timely;
extern crate differential_dataflow;

use timely::PartialOrder;
use timely::dataflow::*;
use timely::dataflow::operators::probe::Handle;
Expand Down
4 changes: 0 additions & 4 deletions examples/projekt.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
extern crate rand;
extern crate timely;
extern crate differential_dataflow;

use timely::dataflow::operators::probe::Handle;

use differential_dataflow::input::InputSession;
Expand Down
3 changes: 0 additions & 3 deletions examples/spines.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
extern crate timely;
extern crate differential_dataflow;

use timely::dataflow::operators::probe::Handle;

use differential_dataflow::input::Input;
Expand Down
3 changes: 0 additions & 3 deletions examples/stackoverflow.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
extern crate timely;
extern crate differential_dataflow;

use std::io::{BufRead, BufReader};
use std::fs::File;

Expand Down
Loading

0 comments on commit b4c40f6

Please sign in to comment.