frankmcsherry / pagerank

Implementation of PageRank in timely dataflow
MIT License
73 stars 16 forks source link

Compilation errors building pagerank #2

Closed scooter-dangle closed 9 years ago

scooter-dangle commented 9 years ago

Is there a particular version of rust that you will compile pagerank correctly?

rustc --version

gives

rustc 1.4.0 (8ab8581f6 2015-10-27)

Running

cargo build --bin pagerank

results in the following being printed to stderror:

src/main.rs:63:61: 63:62 error: mismatched types:
 expected `timely::progress::nested::product::Product<timely::progress::timestamp::RootTimestamp, _>`,
    found `_`
(expected struct `timely::progress::nested::product::Product`,
    found integral variable) [E0308]
src/main.rs:63                                     vec![RootTimestamp::new(0)],
                                                                           ^
src/main.rs:63:37: 63:64 note: in this expansion of vec! (defined in <std macros>)
src/main.rs:32:5: 174:6 note: in this expansion of if let expansion
src/main.rs:63:61: 63:62 help: run `rustc --explain E0308` to see a detailed explanation
src/main.rs:76:137: 76:147 error: the trait `core::fmt::Display` is not implemented for the type `timely::progress::nested::product::Product<timely::progress::timestamp::RootTimestamp, _>` [E0277]
src/main.rs:76                         if index == 0 { println!("{}:{}:{}.{} starting iteration {}", now.tm_hour, now.tm_min, now.tm_sec, now.tm_nsec, iter.inner); }
                                                                                                                                                       ^~~~~~~~~~
<std macros>:2:25: 2:56 note: in this expansion of format_args!
<std macros>:3:1: 3:54 note: in this expansion of print! (defined in <std macros>)
src/main.rs:76:41: 76:149 note: in this expansion of println! (defined in <std macros>)
src/main.rs:72:21: 107:22 note: in this expansion of while let expansion
src/main.rs:32:5: 174:6 note: in this expansion of if let expansion
src/main.rs:76:137: 76:147 help: run `rustc --explain E0277` to see a detailed explanation
src/main.rs:76:137: 76:147 note: `timely::progress::nested::product::Product<timely::progress::timestamp::RootTimestamp, _>` cannot be formatted with the default formatter; try using `:?` instead if you are using a format string
src/main.rs:76:137: 76:147 note: required by `core::fmt::Display::fmt`
src/main.rs:80:42: 80:43 error: mismatched types:
 expected `timely::progress::nested::product::Product<timely::progress::timestamp::RootTimestamp, _>`,
    found `_`
(expected struct `timely::progress::nested::product::Product`,
    found integral variable) [E0308]
src/main.rs:80                         if iter.inner == 0 {
                                                        ^
src/main.rs:72:21: 107:22 note: in this expansion of while let expansion
src/main.rs:32:5: 174:6 note: in this expansion of if let expansion
src/main.rs:80:42: 80:43 help: run `rustc --explain E0308` to see a detailed explanation
src/main.rs:87:42: 87:43 error: mismatched types:
 expected `timely::progress::nested::product::Product<timely::progress::timestamp::RootTimestamp, _>`,
    found `_`
(expected struct `timely::progress::nested::product::Product`,
    found integral variable) [E0308]
src/main.rs:87                         if iter.inner == 0  && index == 0 { println!("src: {}, dst: {}, edges: {}", src.len(), rev.len(), trn.len()); }
                                                        ^
src/main.rs:72:21: 107:22 note: in this expansion of while let expansion
src/main.rs:32:5: 174:6 note: in this expansion of if let expansion
src/main.rs:87:42: 87:43 help: run `rustc --explain E0308` to see a detailed explanation
src/main.rs:88:42: 88:44 error: mismatched types:
 expected `timely::progress::nested::product::Product<timely::progress::timestamp::RootTimestamp, _>`,
    found `_`
(expected struct `timely::progress::nested::product::Product`,
    found integral variable) [E0308]
src/main.rs:88                         if iter.inner == 10 && index == 0 { going = time::precise_time_s(); }
                                                        ^~
src/main.rs:72:21: 107:22 note: in this expansion of while let expansion
src/main.rs:32:5: 174:6 note: in this expansion of if let expansion
src/main.rs:88:42: 88:44 help: run `rustc --explain E0308` to see a detailed explanation
src/main.rs:89:42: 89:44 error: mismatched types:
 expected `timely::progress::nested::product::Product<timely::progress::timestamp::RootTimestamp, _>`,
    found `_`
(expected struct `timely::progress::nested::product::Product`,
    found integral variable) [E0308]
src/main.rs:89                         if iter.inner == 20 && index == 0 { println!("average: {}", (time::precise_time_s() - going) / 10.0 ); }
                                                        ^~
src/main.rs:72:21: 107:22 note: in this expansion of while let expansion
src/main.rs:32:5: 174:6 note: in this expansion of if let expansion
src/main.rs:89:42: 89:44 help: run `rustc --explain E0308` to see a detailed explanation
error: aborting due to 6 previous errors
Could not compile `pagerank`.

To learn more, run the command again with --verbose.
frankmcsherry commented 9 years ago

Yup. Just pushed a fix. A change in timely from 0.9 to 0.10 (and me not putting timely="0.9" in Cargo.toml) broke things.