TimelyDataflow / timely-dataflow

A modular implementation of timely dataflow in Rust
MIT License
3.3k stars 272 forks source link

Unreproducible release for timely 0.12.0 #559

Open paolobarbolini opened 7 months ago

paolobarbolini commented 7 months ago

Hi! As part of https://github.com/M4SS-Code/cargo-goggles/issues/11 we're scraping the top 20k crates from crates.io and verifying that the releases can be reproduced from the contents of the git repository. timely v0.12.0 doesn't reproduce, which can be verified with the following script:

git clone https://github.com/TimelyDataflow/timely-dataflow.git
cd timely-dataflow/
git checkout v0.12.0
cargo package --no-verify --package timely
cd ..
cp timely-dataflow/target/package/timely-0.12.0.crate our-release.tar.gz
curl -o upstream.tar.gz --fail "https://static.crates.io/crates/timely/timely-0.12.0.crate"
mkdir upstream
mkdir our-release
tar -xvzf upstream.tar.gz -C upstream
tar -xvzf our-release.tar.gz -C our-release
diff -r our-release upstream

Which yields this diff (differences in Cargo.toml and Cargo.lock are skipped as likely caused by cargo hack):

Only in our-release/timely-0.12.0: README.md
diff -r our-release/timely-0.12.0/src/dataflow/operators/generic/builder_rc.rs upstream/timely-0.12.0/src/dataflow/operators/generic/builder_rc.rs
139c139
<         let mut capabilities = Vec::with_capacity(self.internal.borrow().len());
---
>         let mut capabilities = Vec::new();
diff -r our-release/timely-0.12.0/src/dataflow/operators/partition.rs upstream/timely-0.12.0/src/dataflow/operators/partition.rs
9c9
< pub trait Partition<G: Scope, D: Data, D2: Data, F: Fn(D) -> (u64, D2)> {
---
> pub trait Partition<G: Scope, D: Data, D2: Data, F: Fn(D)->(u64, D2)> {
29a30
> 
33,34c34,35
<         let mut outputs = Vec::with_capacity(parts as usize);
<         let mut streams = Vec::with_capacity(parts as usize);
---
>         let mut outputs = Vec::new();
>         let mut streams = Vec::new();
49d49
< 
60c60
< }
---
> }
\ No newline at end of file
diff -r our-release/timely-0.12.0/src/dataflow/stream.rs upstream/timely-0.12.0/src/dataflow/stream.rs
13d12
< use std::fmt;
57,68d55
< }
< 
< impl<S, D> fmt::Debug for Stream<S, D>
< where
<     S: Scope,
< {
<     fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
<         f.debug_struct("Stream")
<             .field("source", &self.name)
<             // TODO: Use `.finish_non_exhaustive()` after rust/#67364 lands
<             .finish()
<     }
diff -r our-release/timely-0.12.0/src/execute.rs upstream/timely-0.12.0/src/execute.rs
260d259
<     let worker_config = config.worker;
263c262
<         let mut worker = Worker::new(worker_config.clone(), allocator);
---
>         let mut worker = Worker::new(WorkerConfig::default(), allocator);
diff -r our-release/timely-0.12.0/src/progress/reachability.rs upstream/timely-0.12.0/src/progress/reachability.rs
301c301
<         let mut worklist = Vec::with_capacity(in_degree.len());
---
>         let mut worklist = Vec::new();
diff -r our-release/timely-0.12.0/src/synchronization/sequence.rs upstream/timely-0.12.0/src/synchronization/sequence.rs
182,183d181
< 
<                         recvd.reserve(vector.len());
diff -r our-release/timely-0.12.0/src/worker.rs upstream/timely-0.12.0/src/worker.rs
137,146d136
<     ///
<     /// # Examples
<     /// ```rust
<     /// let mut config = timely::Config::process(3);
<     /// config.worker.set("example".to_string(), 7u64);
<     /// timely::execute(config, |worker| {
<     ///    use crate::timely::worker::AsWorker;
<     ///    assert_eq!(worker.config().get::<u64>("example"), Some(&7));
<     /// }).unwrap();
<     /// ```
160,169d149
<     ///
<     /// # Examples
<     /// ```rust
<     /// let mut config = timely::Config::process(3);
<     /// config.worker.set("example".to_string(), 7u64);
<     /// timely::execute(config, |worker| {
<     ///    use crate::timely::worker::AsWorker;
<     ///    assert_eq!(worker.config().get::<u64>("example"), Some(&7));
<     /// }).unwrap();
<     /// ```

The differences seem to be explained by parts of 13b73972939b25a6a5eb0b673d0597aea226c7a4 being missed in the release.